
public final class ModularClassResolver extends java.lang.Object implements ClassResolver
| Modifier and Type | Method and Description |
|---|---|
void |
annotateClass(Marshaller marshaller,
java.lang.Class<?> clazz)
Add optional information about a class to a stream.
|
void |
annotateProxyClass(Marshaller marshaller,
java.lang.Class<?> proxyClass)
Add optional information about a proxy class to a stream.
|
java.lang.String |
getClassName(java.lang.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.
|
java.lang.String[] |
getProxyInterfaces(java.lang.Class<?> proxyClass)
Get the interface names to write for a given proxy class.
|
java.lang.Class<?> |
resolveClass(Unmarshaller unmarshaller,
java.lang.String className,
long serialVersionUID)
Load the local class for a class descriptor.
|
java.lang.Class<?> |
resolveProxyClass(Unmarshaller unmarshaller,
java.lang.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, java.lang.Class<?> clazz) throws java.io.IOException
annotateClass in interface ClassResolvermarshaller - the marshaller to write toclazz - the class that was writtenjava.io.IOException - if an error occursObjectOutputStream.annotateClass(Class)public void annotateProxyClass(Marshaller marshaller, java.lang.Class<?> proxyClass) throws java.io.IOException
annotateProxyClass in interface ClassResolvermarshaller - the marshaller to write toproxyClass - the class that was writtenjava.io.IOException - if an error occursObjectOutputStream.annotateProxyClass(Class)public java.lang.String getClassName(java.lang.Class<?> clazz)
throws java.io.IOException
getClassName in interface ClassResolverclazz - the classjava.io.IOException - if an error occurspublic java.lang.String[] getProxyInterfaces(java.lang.Class<?> proxyClass)
throws java.io.IOException
getProxyInterfaces in interface ClassResolverproxyClass - the proxy classjava.io.IOException - if an error occurspublic java.lang.Class<?> resolveClass(Unmarshaller unmarshaller, java.lang.String className, long serialVersionUID) throws java.io.IOException, java.lang.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 UIDjava.io.IOException - if an I/O error occursjava.lang.ClassNotFoundException - if the class could not be loadedObjectInputStream.resolveClass(java.io.ObjectStreamClass)public java.lang.Class<?> resolveProxyClass(Unmarshaller unmarshaller, java.lang.String[] names) throws java.io.IOException, java.lang.ClassNotFoundException
resolveProxyClass in interface ClassResolverunmarshaller - the unmarshaller from which to read annotation data, if anynames - the class descriptorjava.io.IOException - if an I/O error occursjava.lang.ClassNotFoundException - if the proxy class could not be loadedObjectInputStream.resolveProxyClass(String[])Copyright © 2011 JBoss, a division of Red Hat, Inc.