public final class RegistrableTypes extends java.lang.Object
Decides whether a type found by scanning can be registered for reflection.
Registering one that cannot be loaded here does not degrade at run time -- it fails the build, because the image analysis parses what it is asked to keep. The framework compiles against optional integrations, so a scan of its own packages finds classes an application need not be able to load: the JSP support without the JSP API, the GSP compiler's task without Ant, a datastore without its driver.
Two questions are asked, because either alone lets one of those through. Whether the type and the class declaring it load covers a closure whose enclosing class extends something absent, which the closure's own bytecode need not name -- it reaches it through invokedynamic. Whether the types its bytecode names load covers the opposite case, a class that loads cleanly while a method body names something absent, because loading resolves signatures and not bodies.
| Type Params | Return Type | Name and description |
|---|---|---|
|
public static boolean |
loads(java.lang.String className, java.lang.ClassLoader classLoader)Whether the type, and the class declaring it, load here. |
|
public static boolean |
referencesLoad(java.io.InputStream bytecode, java.lang.ClassLoader classLoader)Whether every type named in the given bytecode loads here, following the declaration and the bodies of the methods. |
| Methods inherited from class | Name |
|---|---|
class java.lang.Object |
java.lang.Object#equals(java.lang.Object), java.lang.Object#getClass(), java.lang.Object#hashCode(), java.lang.Object#notify(), java.lang.Object#notifyAll(), java.lang.Object#toString(), java.lang.Object#wait(), java.lang.Object#wait(long), java.lang.Object#wait(long, int) |
Whether the type, and the class declaring it, load here.
className - the binary name of the typeclassLoader - the loader to resolve againstWhether every type named in the given bytecode loads here, following the declaration and the bodies of the methods.
bytecode - the class file to read; closed by this methodclassLoader - the loader to resolve against