MCPcopy Create free account
hub / github.com/antlr/codebuff / initialize

Method initialize

corpus/java/training/guava/reflect/Reflection.java:63–71  ·  view source on GitHub ↗

Ensures that the given classes are initialized, as described in JLS Section 12.4.2 . WARNING: Normally it's a smell if a class needs to be explicitly initialized, because static state hurts system maintaina

(Class<?>... classes)

Source from the content-addressed store, hash-verified

61 * @throws ExceptionInInitializerError if an exception is thrown during initialization of a class
62 */
63 public static void initialize(Class<?>... classes) {
64 for (Class<?> clazz : classes) {
65 try {
66 Class.forName(clazz.getName(), true, clazz.getClassLoader());
67 } catch (ClassNotFoundException e) {
68 throw new AssertionError(e);
69 }
70 }
71 }
72
73 /**
74 * Returns a proxy instance that implements {@code interfaceType} by dispatching method

Callers 1

hashCodeMethod · 0.45

Calls 1

getNameMethod · 0.45

Tested by

no test coverage detected