public class OXMJavaClassImpl extends java.lang.Object implements JavaClass
Purpose: JavaClass implementation wrapping MOXy's xmlmodel.JavaType.
Used when bootstrapping a DynamicJAXBContext from XML Bindings.
Responsibilities:
JavaType.| Constructor and Description |
|---|
OXMJavaClassImpl(JavaType aJavaType)
Construct a new instance of
OXMJavaClassImpl. |
OXMJavaClassImpl(java.lang.String aJavaTypeName)
Construct a new instance of
OXMJavaClassImpl. |
OXMJavaClassImpl(java.lang.String aJavaTypeName,
java.util.List<java.lang.String> enumValues)
Construct a new instance of
OXMJavaClassImpl
representing a Java enum. |
| Modifier and Type | Method and Description |
|---|---|
java.util.Collection<JavaClass> |
getActualTypeArguments()
Return the "actual" type from a parameterized type.
|
JavaAnnotation |
getAnnotation(JavaClass aClass)
If this
JavaClass is annotated with an Annotation matching aClass,
return its JavaAnnotation representation. |
java.util.Collection<JavaAnnotation> |
getAnnotations()
Return all of the
Annotations for this JavaClass. |
JavaClass |
getComponentType()
If this
JavaClass is an array type, return the type of the
array components. |
JavaConstructor |
getConstructor(JavaClass[] parameterTypes)
Return the
JavaConstructor for this JavaClass that has the
provided parameter types. |
java.util.Collection<JavaConstructor> |
getConstructors()
Return all of the
JavaConstructors for this JavaClass. |
JavaAnnotation |
getDeclaredAnnotation(JavaClass arg0)
If this
JavaClass declares an Annotation matching aClass,
return its JavaAnnotation representation. |
java.util.Collection<JavaAnnotation> |
getDeclaredAnnotations()
Return all of the declared
Annotations for this JavaClass. |
java.util.Collection<JavaClass> |
getDeclaredClasses()
Return this
JavaClass' inner classes. |
JavaConstructor |
getDeclaredConstructor(JavaClass[] parameterTypes)
Return the declared
JavaConstructor for this JavaClass. |
java.util.Collection<JavaConstructor> |
getDeclaredConstructors()
Return all of the declared
JavaConstructors for this JavaClass. |
JavaField |
getDeclaredField(java.lang.String name)
Return the declared
JavaField for this JavaClass, identified
by fieldName. |
java.util.Collection<JavaField> |
getDeclaredFields()
Return all of the declared
JavaFields for this JavaClass. |
JavaMethod |
getDeclaredMethod(java.lang.String name,
JavaClass[] args)
Return the declared
JavaMethod for this JavaClass,
identified by name, with the signature matching args. |
java.util.Collection<JavaMethod> |
getDeclaredMethods()
Return all of the declared
JavaMethods for this JavaClass. |
java.lang.reflect.Type[] |
getGenericInterfaces() |
java.lang.reflect.Type |
getGenericSuperclass() |
JavaModel |
getJavaModel()
Set this
JavaClass' JavaModel. |
JavaMethod |
getMethod(java.lang.String name,
JavaClass[] args)
Return the
JavaMethod for this JavaClass,
identified by name, with the signature matching args. |
java.util.Collection<JavaMethod> |
getMethods()
Return all of the
JavaMethods for this JavaClass. |
int |
getModifiers()
Returns the Java language modifiers for this
JavaClass, encoded in an integer. |
java.lang.String |
getName()
Returns the name of this
JavaClass. |
JavaPackage |
getPackage()
Returns the
JavaPackage that this JavaClass belongs to. |
java.lang.String |
getPackageName()
Returns the package name of this
JavaClass. |
java.lang.String |
getQualifiedName()
Returns the fully-qualified name of this
JavaClass. |
java.lang.String |
getRawName()
Returns the raw name of this
JavaClass. |
JavaClass |
getSuperclass()
Returns the super class of this
JavaClass. |
boolean |
hasActualTypeArguments()
Indicates if this
JavaClass has actual type arguments, i.e. is a
parameterized type (for example, List<Employee). |
boolean |
isAbstract()
Indicates if this
JavaClass is abstract. |
boolean |
isAnnotation()
Indicates if this
JavaClass is an Annotation. |
boolean |
isArray()
Indicates if this
JavaClass is an Array type. |
boolean |
isAssignableFrom(JavaClass arg0)
Indicates if this
JavaClass is either the same as, or is a superclass of,
the javaClass argument. |
boolean |
isEnum()
Indicates if this
JavaClass is an enum. |
boolean |
isFinal()
Indicates if this
JavaClass is final. |
boolean |
isInterface()
Indicates if this
JavaClass is an interface. |
boolean |
isMemberClass()
Indicates if this
JavaClass is an inner Class. |
boolean |
isPrimitive()
Indicates if this
JavaClass represents a primitive type. |
boolean |
isPrivate()
Indicates if this
JavaClass is private. |
boolean |
isProtected()
Indicates if this
JavaClass is protected. |
boolean |
isPublic()
Indicates if this
JavaClass is public. |
boolean |
isStatic()
Indicates if this
JavaClass is static. |
boolean |
isSynthetic()
Not supported.
|
void |
setJavaModel(JavaModel model)
Get this
JavaClass' JavaModel. |
public OXMJavaClassImpl(JavaType aJavaType)
OXMJavaClassImpl.aJavaType - - the XJC JavaType to be wrapped.public OXMJavaClassImpl(java.lang.String aJavaTypeName)
OXMJavaClassImpl.aJavaTypeName - - the name of the JavaType to create.public OXMJavaClassImpl(java.lang.String aJavaTypeName,
java.util.List<java.lang.String> enumValues)
OXMJavaClassImpl
representing a Java enum.aJavaTypeName - - the name of the JavaType to create.enumValues - - the list of values for this enum.public java.util.Collection<JavaClass> getActualTypeArguments()
JavaClass represents List<Employee, this method will return the
Employee JavaClass.getActualTypeArguments in interface JavaClassCollection containing the actual type's JavaClass.public JavaClass getComponentType()
JavaClass is an array type, return the type of the
array components.getComponentType in interface JavaClassnull, as JavaTypes do not represent arrays.public JavaConstructor getConstructor(JavaClass[] parameterTypes)
JavaConstructor for this JavaClass that has the
provided parameter types.getConstructor in interface JavaClassparameterTypes - the parameter list used to identify the constructor.JavaConstructor with the signature matching parameterTypes.public java.util.Collection<JavaConstructor> getConstructors()
JavaConstructors for this JavaClass.getConstructors in interface JavaClassCollection containing this JavaClass' JavaConstructors.public java.util.Collection<JavaClass> getDeclaredClasses()
JavaClass' inner classes.getDeclaredClasses in interface JavaClassArrayList as JavaTypes do not represent inner classes.public JavaConstructor getDeclaredConstructor(JavaClass[] parameterTypes)
JavaConstructor for this JavaClass.getDeclaredConstructor in interface JavaClassJavaConstructor for this JavaClass.public java.util.Collection<JavaConstructor> getDeclaredConstructors()
JavaConstructors for this JavaClass.getDeclaredConstructors in interface JavaClassCollection containing this JavaClass' JavaConstructors.public JavaField getDeclaredField(java.lang.String name)
JavaField for this JavaClass, identified
by fieldName.getDeclaredField in interface JavaClassname - the name of the JavaField to return.JavaField named fieldName from this JavaClass.public java.util.Collection<JavaField> getDeclaredFields()
JavaFields for this JavaClass.getDeclaredFields in interface JavaClassCollection containing this JavaClass' JavaFields.public JavaMethod getDeclaredMethod(java.lang.String name, JavaClass[] args)
JavaMethod for this JavaClass,
identified by name, with the signature matching args.getDeclaredMethod in interface JavaClassname - the name of the JavaMethod to return.args - the parameter list used to identify the method.null, as JavaTypes do not have methods.public java.util.Collection<JavaMethod> getDeclaredMethods()
JavaMethods for this JavaClass.getDeclaredMethods in interface JavaClassArrayList, as JavaTypes do not have methods.public JavaMethod getMethod(java.lang.String name, JavaClass[] args)
JavaMethod for this JavaClass,
identified by name, with the signature matching args.public java.util.Collection<JavaMethod> getMethods()
JavaMethods for this JavaClass.getMethods in interface JavaClassArrayList, as JavaTypes do not have methods.public int getModifiers()
JavaClass, encoded in an integer.getModifiers in interface JavaClass0 as JavaTypes do not have modifiers.Modifierpublic java.lang.String getName()
JavaClass.public JavaPackage getPackage()
JavaPackage that this JavaClass belongs to.getPackage in interface JavaClassJavaPackage of this JavaClass.public java.lang.String getPackageName()
JavaClass.getPackageName in interface JavaClassString name of this JavaClass' JavaPackage.public java.lang.String getQualifiedName()
JavaClass.getQualifiedName in interface JavaClassString name of this JavaClass.public java.lang.String getRawName()
JavaClass. Array types will
have "[]" appended to the name.getRawName in interface JavaClassString raw name of this JavaClass.public JavaClass getSuperclass()
JavaClass.getSuperclass in interface JavaClassJavaClass representing the super class of this JavaClass.public java.lang.reflect.Type[] getGenericInterfaces()
getGenericInterfaces in interface JavaClasspublic java.lang.reflect.Type getGenericSuperclass()
getGenericSuperclass in interface JavaClasspublic boolean hasActualTypeArguments()
JavaClass has actual type arguments, i.e. is a
parameterized type (for example, List<Employee).hasActualTypeArguments in interface JavaClassfalse as JavaTypes are not parameterized.public boolean isAbstract()
JavaClass is abstract.isAbstract in interface JavaClassfalse as JavaTypes are never abstract.public boolean isAnnotation()
JavaClass is an Annotation.isAnnotation in interface JavaClassfalse as JavaTypes are never Annotations.public boolean isArray()
JavaClass is an Array type.public boolean isAssignableFrom(JavaClass arg0)
JavaClass is either the same as, or is a superclass of,
the javaClass argument.isAssignableFrom in interface JavaClassjavaClass - the Class to test.true if this JavaClass is assignable from
javaClass, otherwise false.Class.isAssignableFrom(Class)public boolean isEnum()
JavaClass is an enum.public boolean isFinal()
JavaClass is final.public boolean isInterface()
JavaClass is an interface.isInterface in interface JavaClasstrue if this JavaClass is an interface, otherwise false.public boolean isMemberClass()
JavaClass is an inner Class.isMemberClass in interface JavaClasstrue if this JavaClass is an inner Class, otherwise false.public boolean isPrimitive()
JavaClass represents a primitive type.isPrimitive in interface JavaClasstrue if this JavaClass represents a primitive type, otherwise false.public boolean isPrivate()
JavaClass is private.public boolean isProtected()
JavaClass is protected.isProtected in interface JavaClasstrue if this JavaClass is protected, otherwise false.public boolean isPublic()
JavaClass is public.public boolean isStatic()
JavaClass is static.public boolean isSynthetic()
isSynthetic in interface JavaClasspublic JavaAnnotation getAnnotation(JavaClass aClass)
JavaClass is annotated with an Annotation matching aClass,
return its JavaAnnotation representation.getAnnotation in interface JavaHasAnnotationsaClass - a JavaClass representing the Annotation to look for.null, as JavaTypes do not have Annotations.public java.util.Collection<JavaAnnotation> getAnnotations()
Annotations for this JavaClass.getAnnotations in interface JavaHasAnnotationsArrayList, as JavaTypes do not have Annotations.public JavaAnnotation getDeclaredAnnotation(JavaClass arg0)
JavaClass declares an Annotation matching aClass,
return its JavaAnnotation representation.getDeclaredAnnotation in interface JavaHasAnnotationsaClass - a JavaClass representing the Annotation to look for.null, as JavaTypes do not have Annotations.public java.util.Collection<JavaAnnotation> getDeclaredAnnotations()
Annotations for this JavaClass.getDeclaredAnnotations in interface JavaHasAnnotationsArrayList, as JavaTypes do not have Annotations.public void setJavaModel(JavaModel model)
JavaClass' JavaModel.public JavaModel getJavaModel()
JavaClass' JavaModel.javaModel - The JavaModel to set.