Top Description Fields Constructors Methods
org.eclipse.persistence.internal.jpa.metadata.accessors.objects

public abstract Class MetadataFactory

extends Object
Class Inheritance
Known Direct Subclasses
org.eclipse.persistence.internal.jpa.metadata.accessors.objects.MetadataAsmFactory
Imports
java.util.HashMap, .List, .Map, org.eclipse.persistence.internal.jpa.metadata.MetadataDescriptor, .MetadataLogger

INTERNAL: A metadata factory is used to extract class information. It is used when processing the metadata model. By default, metadata processing uses an ASM factory, however tools that require a different form of processing, like the APT processor which uses mirrors, can build their own factory by sub-classing this one and supply it at processing time.
Author
James Sutherland
Since
EclipseLink 1.2

Field Summary

Modifier and TypeField and Description
public static boolean
ALLOW_JDK

Backdoor to allow mapping of JDK classes.

protected ClassLoader
protected MetadataLogger
protected Map<String, MetadataClass>
m_metadataClasses

Stores all metadata for classes.

Constructor Summary

AccessConstructor and Description
public
MetadataFactory(MetadataLogger logger, ClassLoader loader)

INTERNAL:

Method Summary

Modifier and TypeMethod and Description
public void
addMetadataClass(MetadataClass metadataClass)

INTERNAL:

public void
addMetadataClass(String name, MetadataClass metadataClass)

INTERNAL:

public ClassLoader
getLoader()

INTERNAL:

public MetadataLogger
getLogger()

INTERNAL:

public abstract MetadataClass
getMetadataClass(String className)

Return the class metadata for the class name.

public abstract MetadataClass
getMetadataClass(String className, boolean isLazy)

Return the class metadata for the class name.

protected Map<String, MetadataClass>
getMetadataClasses()

INTERNAL:

protected boolean
metadataClassExists(String className)

INTERNAL:

public abstract void
resolveGenericTypes(MetadataClass child, List<String> genericTypes, MetadataClass parent, MetadataDescriptor descriptor)

INTERNAL: This method resolves generic types based on the ASM class metadata.

public void
setLoader(ClassLoader loader)

INTERNAL:

public void
setLogger(MetadataLogger logger)

INTERNAL:

Inherited from java.lang.Object:
cloneequalsfinalizegetClasshashCodenotifynotifyAlltoStringwaitwaitwait

Field Detail

ALLOW_JDKback to summary
public static boolean ALLOW_JDK

Backdoor to allow mapping of JDK classes.

m_loaderback to summary
protected ClassLoader m_loader
m_loggerback to summary
protected MetadataLogger m_logger
m_metadataClassesback to summary
protected Map<String, MetadataClass> m_metadataClasses

Stores all metadata for classes.

Constructor Detail

MetadataFactoryback to summary
public MetadataFactory(MetadataLogger logger, ClassLoader loader)

INTERNAL:

Method Detail

addMetadataClassback to summary
public void addMetadataClass(MetadataClass metadataClass)

INTERNAL:

addMetadataClassback to summary
public void addMetadataClass(String name, MetadataClass metadataClass)

INTERNAL:

getLoaderback to summary
public ClassLoader getLoader()

INTERNAL:

getLoggerback to summary
public MetadataLogger getLogger()

INTERNAL:

getMetadataClassback to summary
public abstract MetadataClass getMetadataClass(String className)

Return the class metadata for the class name.

getMetadataClassback to summary
public abstract MetadataClass getMetadataClass(String className, boolean isLazy)

Return the class metadata for the class name.

getMetadataClassesback to summary
protected Map<String, MetadataClass> getMetadataClasses()

INTERNAL:

metadataClassExistsback to summary
protected boolean metadataClassExists(String className)

INTERNAL:

resolveGenericTypesback to summary
public abstract void resolveGenericTypes(MetadataClass child, List<String> genericTypes, MetadataClass parent, MetadataDescriptor descriptor)

INTERNAL: This method resolves generic types based on the ASM class metadata. Unless every other factory (e.g. APT mirror factory) respects the generic format as built from ASM this method will not work since it is very tied to it.

setLoaderback to summary
public void setLoader(ClassLoader loader)

INTERNAL:

setLoggerback to summary
public void setLogger(MetadataLogger logger)

INTERNAL: