public final class ModularClassResolver extends Object implements ClassResolver
| Modifier and Type | Method and Description |
|---|---|
void |
annotateClass(Marshaller marshaller,
Class<?> clazz)
Add optional information about a class to a stream.
|
void |
annotateProxyClass(Marshaller marshaller,
Class<?> proxyClass)
Add optional information about a proxy class to a stream.
|
String |
getClassName(Class<?> clazz)
Get the class name to write for a given class.
|
static ModularClassResolver |
getInstance(org.jboss.modules.ModuleLoader moduleLoader)
Construct a new instance using the given module loader.
|
String[] |
getProxyInterfaces(Class<?> proxyClass)
Get the interface names to write for a given proxy class.
|
Class<?> |
resolveClass(Unmarshaller unmarshaller,
String className,
long serialVersionUID)
Load the local class for a class descriptor.
|
Class<?> |
resolveProxyClass(Unmarshaller unmarshaller,
String[] names)
Load a proxy class that implements the given interfaces.
|
public static ModularClassResolver getInstance(org.jboss.modules.ModuleLoader moduleLoader)
moduleLoader - the module loaderpublic void annotateClass(Marshaller marshaller, Class<?> clazz) throws IOException
annotateClass in interface ClassResolvermarshaller - the marshaller to write toclazz - the class that was writtenIOException - if an error occursObjectOutputStream.annotateClass(Class)public void annotateProxyClass(Marshaller marshaller, Class<?> proxyClass) throws IOException
annotateProxyClass in interface ClassResolvermarshaller - the marshaller to write toproxyClass - the class that was writtenIOException - if an error occursObjectOutputStream.annotateProxyClass(Class)public String getClassName(Class<?> clazz) throws IOException
getClassName in interface ClassResolverclazz - the classIOException - if an error occurspublic String[] getProxyInterfaces(Class<?> proxyClass) throws IOException
getProxyInterfaces in interface ClassResolverproxyClass - the proxy classIOException - if an error occurspublic Class<?> resolveClass(Unmarshaller unmarshaller, String className, long serialVersionUID) throws IOException, ClassNotFoundException
ClassResolver.annotateClass(Marshaller, Class) should be read by this method.resolveClass in interface ClassResolverunmarshaller - the unmarshaller from which to read annotation data, if anyclassName - the class nameserialVersionUID - the serial version UIDIOException - if an I/O error occursClassNotFoundException - if the class could not be loadedObjectInputStream.resolveClass(java.io.ObjectStreamClass)public Class<?> resolveProxyClass(Unmarshaller unmarshaller, String[] names) throws IOException, ClassNotFoundException
resolveProxyClass in interface ClassResolverunmarshaller - the unmarshaller from which to read annotation data, if anynames - the class descriptorIOException - if an I/O error occursClassNotFoundException - if the proxy class could not be loadedObjectInputStream.resolveProxyClass(String[])Copyright © 2017 JBoss by Red Hat. All rights reserved.