Class MetadataClass
- java.lang.Object
-
- org.eclipse.persistence.internal.jpa.metadata.accessors.objects.MetadataAccessibleObject
-
- org.eclipse.persistence.internal.jpa.metadata.accessors.objects.MetadataAnnotatedElement
-
- org.eclipse.persistence.internal.jpa.metadata.accessors.objects.MetadataClass
-
public class MetadataClass extends MetadataAnnotatedElement
INTERNAL: An object to hold onto a valid JPA decorated class.- Since:
- TopLink 10.1.3/EJB 3.0 Preview
- Author:
- Guy Pelletier
-
-
Field Summary
Fields Modifier and Type Field Description protected java.util.List<MetadataClass>m_enclosedClassesprotected java.util.Map<java.lang.String,MetadataField>m_fieldsprotected java.util.List<java.lang.String>m_interfacesprotected booleanm_isAccessibleprotected booleanm_isJDKprotected booleanm_isLazyprotected booleanm_isPrimitiveprotected java.util.Map<java.lang.String,MetadataMethod>m_methodsprotected intm_modifiersprotected MetadataClassm_superclassprotected java.lang.Stringm_superclassName-
Fields inherited from class org.eclipse.persistence.internal.jpa.metadata.accessors.objects.MetadataAnnotatedElement
DEFAULT_RAW_CLASS
-
Fields inherited from class org.eclipse.persistence.internal.jpa.metadata.accessors.objects.MetadataAccessibleObject
m_factory
-
-
Constructor Summary
Constructors Constructor Description MetadataClass(MetadataFactory factory, java.lang.Class cls)Create the metadata class based on the class.MetadataClass(MetadataFactory factory, java.lang.String name)Create the metadata class with the class name.MetadataClass(MetadataFactory factory, java.lang.String name, boolean isLazy)Create the metadata class with the class name.
-
Method Summary
All Methods Instance Methods Concrete Methods Modifier and Type Method Description voidaddEnclosedClass(MetadataClass enclosedClass)INTERNAL:voidaddField(MetadataField field)INTERNAL:voidaddInterface(java.lang.String interfaceName)INTERNAL:voidaddMethod(MetadataMethod method)INTERNAL:booleanequals(java.lang.Object object)Allow comparison to Java classes and Metadata classes.booleanextendsClass(java.lang.Class javaClass)INTERNAL: Return if this class is or extends, or super class extends the class.booleanextendsClass(java.lang.String className)INTERNAL: Return if this class is or extends, or super class extends the class.booleanextendsInterface(java.lang.Class javaClass)INTERNAL: Return if this class is or extends, or super class extends the interface.booleanextendsInterface(java.lang.String className)INTERNAL: Return if this class is or extends, or super class extends the interface.java.util.List<MetadataClass>getEnclosedClasses()INTERNAL: Return the list of classes defined within this metadata class.MetadataFieldgetField(java.lang.String name)INTERNAL: Return the field with the name.MetadataFieldgetField(java.lang.String name, boolean checkSuperClass)INTERNAL: Return the field with the name.java.util.Map<java.lang.String,MetadataField>getFields()INTERNAL:java.util.List<java.lang.String>getInterfaces()INTERNAL:protected MetadataMethodgetMethod(java.lang.String name)INTERNAL: Return the method with the name and no arguments.MetadataMethodgetMethod(java.lang.String name, java.lang.Class[] arguments)INTERNAL: Return the method with the name and argument types.MetadataMethodgetMethod(java.lang.String name, java.lang.String[] arguments)INTERNAL: Return the method with the name and argument types (class names).MetadataMethodgetMethod(java.lang.String name, java.util.List<java.lang.String> arguments)INTERNAL: Return the method with the name and argument types (class names).MetadataMethodgetMethod(java.lang.String name, java.util.List<java.lang.String> arguments, boolean checkSuperClass)INTERNAL: Return the method with the name and argument types (class names).MetadataMethodgetMethodForPropertyName(java.lang.String propertyName)INTERNAL: Return the method for the given property name.java.util.Map<java.lang.String,MetadataMethod>getMethods()INTERNAL:intgetModifiers()INTERNAL:MetadataClassgetSuperclass()INTERNAL:java.lang.StringgetSuperclassName()INTERNAL:java.lang.StringgetTypeName()Return the ASM type name.booleanisAccessible()INTERNAL: Return true is this class accessible to be found.booleanisArray()INTERNAL: Return if this class is an array type.booleanisCollection()INTERNAL: Return if this is extends Collection.booleanisEnum()INTERNAL: Return if this is extends Enum.booleanisInterface()INTERNAL: Return if this is an interface (super is null).booleanisJDK()INTERNAL: Return if this is a JDK (java/javax) class.booleanisLazy()INTERNAL:booleanisList()INTERNAL: Return if this is extends List.booleanisMap()INTERNAL: Return if this is extends Map.booleanisObject()INTERNAL: Return if this is Object class.booleanisPrimitive()INTERNAL: Return if this is a primitive.booleanisSerializable()INTERNAL: Return if this class extends Serializable or is an array type.booleanisSerializableInterface()INTENAL: Return true is this class is the Serializable.class interface.booleanisSet()INTERNAL: Return true if this extends Set.booleanisVoid()INTERNAL: Return if this is the void class.voidsetIsAccessible(boolean isAccessible)INTERNAL:voidsetIsJDK(boolean isJDK)INTERNAL:voidsetIsLazy(boolean isLazy)INTERNAL:voidsetModifiers(int modifiers)INTERNAL:voidsetName(java.lang.String name)INTERNAL:voidsetSuperclass(MetadataClass superclass)INTERNAL:voidsetSuperclassName(java.lang.String superclass)INTERNAL:-
Methods inherited from class org.eclipse.persistence.internal.jpa.metadata.accessors.objects.MetadataAnnotatedElement
addAnnotation, addGenericType, addMetaAnnotation, areAnnotationsCompatibleWithTransient, getAnnotation, getAnnotation, getAnnotation, getAnnotation, getAnnotations, getAttributeName, getDeclaredAnnotationsCount, getGenericType, getMapKeyClass, getName, getPrimitiveType, getRawClass, getRawClassWithGenerics, getReferenceClassFromGeneric, getType, hasDeclaredAnnotations, hashCode, isAnnotationNotPresent, isAnnotationNotPresent, isAnnotationPresent, isAnnotationPresent, isAnnotationPresent, isArray, isBasic, isBasicCollection, isBasicMap, isDerivedId, isDerivedIdClass, isElementCollection, isEmbedded, isEmbeddedId, isGenericCollectionType, isGenericType, isId, isManyToMany, isManyToOne, isOneToMany, isOneToOne, isStructure, isSupportedCollectionClass, isSupportedMapClass, isSupportedToManyCollectionClass, isTransformation, isValidPersistenceElement, isValidPersistenceElement, isVariableOneToOne, isVersion, setAnnotations, setAttributeName, setGenericType, setPrimitiveType, setType, toString
-
Methods inherited from class org.eclipse.persistence.internal.jpa.metadata.accessors.objects.MetadataAccessibleObject
getLogger, getMetadataClass, getMetadataFactory, setMetadataFactory
-
-
-
-
Field Detail
-
m_isLazy
protected boolean m_isLazy
-
m_isAccessible
protected boolean m_isAccessible
-
m_isPrimitive
protected boolean m_isPrimitive
-
m_isJDK
protected boolean m_isJDK
-
m_modifiers
protected int m_modifiers
-
m_interfaces
protected java.util.List<java.lang.String> m_interfaces
-
m_enclosedClasses
protected java.util.List<MetadataClass> m_enclosedClasses
-
m_fields
protected java.util.Map<java.lang.String,MetadataField> m_fields
-
m_methods
protected java.util.Map<java.lang.String,MetadataMethod> m_methods
-
m_superclass
protected MetadataClass m_superclass
-
m_superclassName
protected java.lang.String m_superclassName
-
-
Constructor Detail
-
MetadataClass
public MetadataClass(MetadataFactory factory, java.lang.String name, boolean isLazy)
Create the metadata class with the class name.
-
MetadataClass
public MetadataClass(MetadataFactory factory, java.lang.String name)
Create the metadata class with the class name.
-
MetadataClass
public MetadataClass(MetadataFactory factory, java.lang.Class cls)
Create the metadata class based on the class. Mainly used for primitive defaults.
-
-
Method Detail
-
addEnclosedClass
public void addEnclosedClass(MetadataClass enclosedClass)
INTERNAL:
-
addField
public void addField(MetadataField field)
INTERNAL:
-
addInterface
public void addInterface(java.lang.String interfaceName)
INTERNAL:
-
addMethod
public void addMethod(MetadataMethod method)
INTERNAL:
-
equals
public boolean equals(java.lang.Object object)
Allow comparison to Java classes and Metadata classes.- Overrides:
equalsin classMetadataAnnotatedElement
-
extendsClass
public boolean extendsClass(java.lang.Class javaClass)
INTERNAL: Return if this class is or extends, or super class extends the class.
-
extendsClass
public boolean extendsClass(java.lang.String className)
INTERNAL: Return if this class is or extends, or super class extends the class.
-
extendsInterface
public boolean extendsInterface(java.lang.Class javaClass)
INTERNAL: Return if this class is or extends, or super class extends the interface.
-
extendsInterface
public boolean extendsInterface(java.lang.String className)
INTERNAL: Return if this class is or extends, or super class extends the interface.
-
getEnclosedClasses
public java.util.List<MetadataClass> getEnclosedClasses()
INTERNAL: Return the list of classes defined within this metadata class. E.g. enums and inner classes.
-
getField
public MetadataField getField(java.lang.String name)
INTERNAL: Return the field with the name. Search for any declared or inherited field.
-
getField
public MetadataField getField(java.lang.String name, boolean checkSuperClass)
INTERNAL: Return the field with the name. Search for any declared or inherited field.
-
getFields
public java.util.Map<java.lang.String,MetadataField> getFields()
INTERNAL:
-
getInterfaces
public java.util.List<java.lang.String> getInterfaces()
INTERNAL:
-
getMethod
protected MetadataMethod getMethod(java.lang.String name)
INTERNAL: Return the method with the name and no arguments.
-
getMethod
public MetadataMethod getMethod(java.lang.String name, java.lang.Class[] arguments)
INTERNAL: Return the method with the name and argument types.
-
getMethod
public MetadataMethod getMethod(java.lang.String name, java.util.List<java.lang.String> arguments)
INTERNAL: Return the method with the name and argument types (class names).
-
getMethod
public MetadataMethod getMethod(java.lang.String name, java.util.List<java.lang.String> arguments, boolean checkSuperClass)
INTERNAL: Return the method with the name and argument types (class names).
-
getMethod
public MetadataMethod getMethod(java.lang.String name, java.lang.String[] arguments)
INTERNAL: Return the method with the name and argument types (class names).
-
getMethodForPropertyName
public MetadataMethod getMethodForPropertyName(java.lang.String propertyName)
INTERNAL: Return the method for the given property name.
-
getMethods
public java.util.Map<java.lang.String,MetadataMethod> getMethods()
INTERNAL:
-
getModifiers
public int getModifiers()
INTERNAL:- Overrides:
getModifiersin classMetadataAnnotatedElement
-
getSuperclass
public MetadataClass getSuperclass()
INTERNAL:
-
getSuperclassName
public java.lang.String getSuperclassName()
INTERNAL:
-
getTypeName
public java.lang.String getTypeName()
Return the ASM type name.
-
isAccessible
public boolean isAccessible()
INTERNAL: Return true is this class accessible to be found.
-
isArray
public boolean isArray()
INTERNAL: Return if this class is an array type.
-
isCollection
public boolean isCollection()
INTERNAL: Return if this is extends Collection.
-
isEnum
public boolean isEnum()
INTERNAL: Return if this is extends Enum.
-
isInterface
public boolean isInterface()
INTERNAL: Return if this is an interface (super is null).
-
isJDK
public boolean isJDK()
INTERNAL: Return if this is a JDK (java/javax) class.
-
isLazy
public boolean isLazy()
INTERNAL:
-
isList
public boolean isList()
INTERNAL: Return if this is extends List.
-
isMap
public boolean isMap()
INTERNAL: Return if this is extends Map.
-
isObject
public boolean isObject()
INTERNAL: Return if this is Object class.
-
isPrimitive
public boolean isPrimitive()
INTERNAL: Return if this is a primitive.
-
isSerializable
public boolean isSerializable()
INTERNAL: Return if this class extends Serializable or is an array type.
-
isSerializableInterface
public boolean isSerializableInterface()
INTENAL: Return true is this class is the Serializable.class interface.
-
isSet
public boolean isSet()
INTERNAL: Return true if this extends Set.
-
isVoid
public boolean isVoid()
INTERNAL: Return if this is the void class.
-
setIsAccessible
public void setIsAccessible(boolean isAccessible)
INTERNAL:
-
setIsJDK
public void setIsJDK(boolean isJDK)
INTERNAL:
-
setIsLazy
public void setIsLazy(boolean isLazy)
INTERNAL:
-
setModifiers
public void setModifiers(int modifiers)
INTERNAL:- Overrides:
setModifiersin classMetadataAnnotatedElement
-
setName
public void setName(java.lang.String name)
INTERNAL:- Overrides:
setNamein classMetadataAnnotatedElement
-
setSuperclass
public void setSuperclass(MetadataClass superclass)
INTERNAL:
-
setSuperclassName
public void setSuperclassName(java.lang.String superclass)
INTERNAL:
-
-