Class JavaClassImpl
- java.lang.Object
-
- org.eclipse.persistence.jaxb.javamodel.reflection.JavaClassImpl
-
- All Implemented Interfaces:
JavaClass
,JavaHasAnnotations
public class JavaClassImpl extends java.lang.Object implements JavaClass
INTERNAL:Purpose:A wrapper class for a JDK Class. This implementation of the EclipseLink JAXB 2.X Java model simply makes reflective calls on the underlying JDK object.
Responsibilities:
- Provide access to the underlying JDK Class' name, package, method/field names and parameters, annotations, etc.
- See Also:
JavaClass
,Class
- Since:
- Oracle TopLink 11.1.1.0.0
-
-
Field Summary
Fields Modifier and Type Field Description protected boolean
isMetadataComplete
protected JavaModelImpl
javaModelImpl
protected java.lang.Class
jClass
protected java.lang.reflect.ParameterizedType
jType
protected JavaClass
superClassOverride
protected static java.lang.String
XML_REGISTRY_CLASS_NAME
-
Constructor Summary
Constructors Constructor Description JavaClassImpl(java.lang.Class javaClass, JavaModelImpl javaModelImpl)
JavaClassImpl(java.lang.reflect.ParameterizedType javaType, java.lang.Class javaClass, JavaModelImpl javaModelImpl)
-
Method Summary
All Methods Instance Methods Concrete Methods Modifier and Type Method Description java.util.Collection
getActualTypeArguments()
java.lang.reflect.AnnotatedElement
getAnnotatedElement()
JavaAnnotation
getAnnotation(JavaClass arg0)
Assumes JavaType is a JavaClassImpl instancejava.util.Collection<JavaAnnotation>
getAnnotations()
JavaClass
getComponentType()
JavaConstructor
getConstructor(JavaClass[] paramTypes)
java.util.Collection
getConstructors()
JavaAnnotation
getDeclaredAnnotation(JavaClass arg0)
java.util.Collection
getDeclaredAnnotations()
java.util.Collection<JavaClass>
getDeclaredClasses()
JavaConstructor
getDeclaredConstructor(JavaClass[] paramTypes)
java.util.Collection
getDeclaredConstructors()
JavaField
getDeclaredField(java.lang.String arg0)
java.util.Collection<JavaField>
getDeclaredFields()
JavaMethod
getDeclaredMethod(java.lang.String arg0, JavaClass[] arg1)
Assumes JavaType[] contains JavaClassImpl instancesjava.util.Collection
getDeclaredMethods()
JavaField
getField(java.lang.String arg0)
java.util.Collection
getFields()
java.lang.reflect.Type[]
getGenericInterfaces()
java.lang.reflect.Type
getGenericSuperclass()
java.lang.Class
getJavaClass()
JavaField
getJavaField(java.lang.reflect.Field field)
JavaMethod
getJavaMethod(java.lang.reflect.Method method)
JavaMethod
getMethod(java.lang.String arg0, JavaClass[] arg1)
Assumes JavaType[] contains JavaClassImpl instancesjava.util.Collection
getMethods()
int
getModifiers()
java.lang.String
getName()
JavaClass
getOwningClass()
JavaPackage
getPackage()
java.lang.String
getPackageName()
java.lang.String
getQualifiedName()
java.lang.String
getRawName()
JavaClass
getSuperclass()
JavaClass
getSuperClassOverride()
boolean
hasActualTypeArguments()
JavaClassInstanceOf
instanceOf()
boolean
isAbstract()
boolean
isAnnotation()
boolean
isArray()
boolean
isAssignableFrom(JavaClass arg0)
boolean
isEnum()
boolean
isFinal()
boolean
isInterface()
boolean
isMemberClass()
boolean
isPrimitive()
boolean
isPrivate()
boolean
isProtected()
boolean
isPublic()
boolean
isStatic()
boolean
isSynthetic()
void
setJavaModelImpl(JavaModelImpl javaModel)
void
setSuperClassOverride(JavaClass superClassOverride)
java.lang.String
toString()
-
-
-
Field Detail
-
jType
protected java.lang.reflect.ParameterizedType jType
-
jClass
protected java.lang.Class jClass
-
javaModelImpl
protected JavaModelImpl javaModelImpl
-
isMetadataComplete
protected boolean isMetadataComplete
-
superClassOverride
protected JavaClass superClassOverride
-
XML_REGISTRY_CLASS_NAME
protected static final java.lang.String XML_REGISTRY_CLASS_NAME
- See Also:
- Constant Field Values
-
-
Constructor Detail
-
JavaClassImpl
public JavaClassImpl(java.lang.Class javaClass, JavaModelImpl javaModelImpl)
-
JavaClassImpl
public JavaClassImpl(java.lang.reflect.ParameterizedType javaType, java.lang.Class javaClass, JavaModelImpl javaModelImpl)
-
-
Method Detail
-
setJavaModelImpl
public void setJavaModelImpl(JavaModelImpl javaModel)
-
getActualTypeArguments
public java.util.Collection getActualTypeArguments()
- Specified by:
getActualTypeArguments
in interfaceJavaClass
-
toString
public java.lang.String toString()
- Overrides:
toString
in classjava.lang.Object
-
getAnnotation
public JavaAnnotation getAnnotation(JavaClass arg0)
Assumes JavaType is a JavaClassImpl instance- Specified by:
getAnnotation
in interfaceJavaHasAnnotations
-
getAnnotations
public java.util.Collection<JavaAnnotation> getAnnotations()
- Specified by:
getAnnotations
in interfaceJavaHasAnnotations
-
getDeclaredClasses
public java.util.Collection<JavaClass> getDeclaredClasses()
- Specified by:
getDeclaredClasses
in interfaceJavaClass
-
getDeclaredField
public JavaField getDeclaredField(java.lang.String arg0)
- Specified by:
getDeclaredField
in interfaceJavaClass
-
getDeclaredFields
public java.util.Collection<JavaField> getDeclaredFields()
- Specified by:
getDeclaredFields
in interfaceJavaClass
-
getDeclaredMethod
public JavaMethod getDeclaredMethod(java.lang.String arg0, JavaClass[] arg1)
Assumes JavaType[] contains JavaClassImpl instances- Specified by:
getDeclaredMethod
in interfaceJavaClass
-
getDeclaredMethods
public java.util.Collection getDeclaredMethods()
- Specified by:
getDeclaredMethods
in interfaceJavaClass
-
getConstructor
public JavaConstructor getConstructor(JavaClass[] paramTypes)
- Specified by:
getConstructor
in interfaceJavaClass
-
getDeclaredConstructor
public JavaConstructor getDeclaredConstructor(JavaClass[] paramTypes)
- Specified by:
getDeclaredConstructor
in interfaceJavaClass
-
getConstructors
public java.util.Collection getConstructors()
- Specified by:
getConstructors
in interfaceJavaClass
-
getDeclaredConstructors
public java.util.Collection getDeclaredConstructors()
- Specified by:
getDeclaredConstructors
in interfaceJavaClass
-
getField
public JavaField getField(java.lang.String arg0)
-
getFields
public java.util.Collection getFields()
-
getJavaClass
public java.lang.Class getJavaClass()
-
getMethod
public JavaMethod getMethod(java.lang.String arg0, JavaClass[] arg1)
Assumes JavaType[] contains JavaClassImpl instances
-
getMethods
public java.util.Collection getMethods()
- Specified by:
getMethods
in interfaceJavaClass
-
getPackage
public JavaPackage getPackage()
- Specified by:
getPackage
in interfaceJavaClass
-
getPackageName
public java.lang.String getPackageName()
- Specified by:
getPackageName
in interfaceJavaClass
-
getQualifiedName
public java.lang.String getQualifiedName()
- Specified by:
getQualifiedName
in interfaceJavaClass
-
getRawName
public java.lang.String getRawName()
- Specified by:
getRawName
in interfaceJavaClass
-
getSuperclass
public JavaClass getSuperclass()
- Specified by:
getSuperclass
in interfaceJavaClass
-
getGenericInterfaces
public java.lang.reflect.Type[] getGenericInterfaces()
- Specified by:
getGenericInterfaces
in interfaceJavaClass
-
getGenericSuperclass
public java.lang.reflect.Type getGenericSuperclass()
- Specified by:
getGenericSuperclass
in interfaceJavaClass
-
hasActualTypeArguments
public boolean hasActualTypeArguments()
- Specified by:
hasActualTypeArguments
in interfaceJavaClass
-
getJavaField
public JavaField getJavaField(java.lang.reflect.Field field)
-
getJavaMethod
public JavaMethod getJavaMethod(java.lang.reflect.Method method)
-
getOwningClass
public JavaClass getOwningClass()
-
isAnnotation
public boolean isAnnotation()
- Specified by:
isAnnotation
in interfaceJavaClass
-
getAnnotatedElement
public java.lang.reflect.AnnotatedElement getAnnotatedElement()
-
isAssignableFrom
public boolean isAssignableFrom(JavaClass arg0)
- Specified by:
isAssignableFrom
in interfaceJavaClass
-
isInterface
public boolean isInterface()
- Specified by:
isInterface
in interfaceJavaClass
-
isMemberClass
public boolean isMemberClass()
- Specified by:
isMemberClass
in interfaceJavaClass
-
isPrimitive
public boolean isPrimitive()
- Specified by:
isPrimitive
in interfaceJavaClass
-
isAbstract
public boolean isAbstract()
- Specified by:
isAbstract
in interfaceJavaClass
-
isProtected
public boolean isProtected()
- Specified by:
isProtected
in interfaceJavaClass
-
getModifiers
public int getModifiers()
- Specified by:
getModifiers
in interfaceJavaClass
-
isSynthetic
public boolean isSynthetic()
- Specified by:
isSynthetic
in interfaceJavaClass
-
instanceOf
public JavaClassInstanceOf instanceOf()
- Specified by:
instanceOf
in interfaceJavaClass
-
getComponentType
public JavaClass getComponentType()
- Specified by:
getComponentType
in interfaceJavaClass
-
getSuperClassOverride
public JavaClass getSuperClassOverride()
-
setSuperClassOverride
public void setSuperClassOverride(JavaClass superClassOverride)
-
getDeclaredAnnotation
public JavaAnnotation getDeclaredAnnotation(JavaClass arg0)
- Specified by:
getDeclaredAnnotation
in interfaceJavaHasAnnotations
-
getDeclaredAnnotations
public java.util.Collection getDeclaredAnnotations()
- Specified by:
getDeclaredAnnotations
in interfaceJavaHasAnnotations
-
-