MCPcopy Create free account
hub / github.com/ReadyTalk/avian / newInstance

Method newInstance

classpath/java/lang/Class.java:140–150  ·  view source on GitHub ↗
()

Source from the content-addressed store, hash-verified

138 }
139
140 public T newInstance()
141 throws IllegalAccessException, InstantiationException
142 {
143 try {
144 return (T) getConstructor().newInstance();
145 } catch (NoSuchMethodException e) {
146 throw new RuntimeException(e);
147 } catch (InvocationTargetException e) {
148 throw new RuntimeException(e);
149 }
150 }
151
152 public static Class forName(String name) throws ClassNotFoundException {
153 return forName(name, true, Method.getCaller().class_.loader);

Callers 5

mainMethod · 0.45
testDerivedMethod · 0.45
mainMethod · 0.45
toArrayMethod · 0.45
findMethod · 0.45

Calls 1

getConstructorMethod · 0.95

Tested by 3

mainMethod · 0.36
testDerivedMethod · 0.36
mainMethod · 0.36