public class XJCJavaClassImpl extends Object implements JavaClass
 Purpose: JavaClass implementation wrapping XJC's JDefinedClass.
 Used when bootstrapping a DynamicJAXBContext from an XML Schema.
 
Responsibilities:
JDefinedClass.JavaClass| Constructor and Description | 
|---|
| XJCJavaClassImpl(com.sun.codemodel.JDefinedClass jDefinedClass,
                com.sun.codemodel.JCodeModel codeModel,
                DynamicClassLoader loader)Construct a new instance of  XJCJavaClassImpl. | 
| XJCJavaClassImpl(com.sun.codemodel.JDefinedClass jDefinedClass,
                com.sun.codemodel.JCodeModel codeModel,
                DynamicClassLoader loader,
                boolean isArray,
                boolean isPrimitive)Construct a new instance of  XJCJavaClassImpl. | 
| Modifier and Type | Method and Description | 
|---|---|
| Collection<JavaClass> | getActualTypeArguments()Return the "actual" type from a parameterized type. | 
| JavaAnnotation | getAnnotation(JavaClass aClass)If this  JavaClassis annotated with anAnnotationmatchingaClass,
 return itsJavaAnnotationrepresentation. | 
| Collection<JavaAnnotation> | getAnnotations()Return all of the  Annotationsfor thisJavaClass. | 
| JavaClass | getComponentType()If this  JavaClassis an array type, return the type of the
 array components. | 
| JavaConstructor | getConstructor(JavaClass[] parameterTypes)Return the  JavaConstructorfor thisJavaClassthat has the
 provided parameter types. | 
| Collection<JavaConstructor> | getConstructors()Return all of the  JavaConstructorsfor thisJavaClass. | 
| JavaAnnotation | getDeclaredAnnotation(JavaClass arg0)Not supported. | 
| Collection<JavaAnnotation> | getDeclaredAnnotations()Not supported. | 
| Collection<JavaClass> | getDeclaredClasses()Return this  JavaClass'inner classes. | 
| JavaConstructor | getDeclaredConstructor(JavaClass[] parameterTypes)Return the declared  JavaConstructorfor thisJavaClassthat has the
 provided parameter types. | 
| Collection<JavaConstructor> | getDeclaredConstructors()Return all of the declared  JavaConstructorsfor thisJavaClass. | 
| JavaField | getDeclaredField(String fieldName)Return the declared  JavaFieldfor thisJavaClass, identified
 byfieldName. | 
| Collection<JavaField> | getDeclaredFields()Return all of the declared  JavaFieldsfor thisJavaClass. | 
| JavaMethod | getDeclaredMethod(String name,
                 JavaClass[] args)Return the declared  JavaMethodfor thisJavaClass,
 identified byname, with the signature matchingargs. | 
| Collection<JavaMethod> | getDeclaredMethods()Return all of the declared  JavaMethodsfor thisJavaClass. | 
| Type[] | getGenericInterfaces() | 
| Type | getGenericSuperclass() | 
| JavaModel | getJavaModel()Get this  JavaClass'JavaModel. | 
| JavaMethod | getMethod(String name,
         JavaClass[] args)Return the  JavaMethodfor thisJavaClass, identified
 byname, with the signature matchingargs. | 
| Collection<JavaMethod> | getMethods()Return all of the  JavaMethodsfor thisJavaClass. | 
| int | getModifiers()Returns the Java language modifiers for this  JavaClass, encoded in an integer. | 
| String | getName()Returns the name of this  JavaClass. | 
| JavaPackage | getPackage()Returns the  JavaPackagethat thisJavaClassbelongs to. | 
| String | getPackageName()Returns the package name of this  JavaClass. | 
| String | getQualifiedName()Returns the fully-qualified name of this  JavaClass. | 
| String | getRawName()Returns the raw name of this  JavaClass. | 
| JavaClass | getSuperclass()Returns the super class of this  JavaClass. | 
| boolean | hasActualTypeArguments()Indicates if this  JavaClasshas actual type arguments, i.e. | 
| JavaClassInstanceOf | instanceOf() | 
| boolean | isAbstract()Indicates if this  JavaClassisabstract. | 
| boolean | isAnnotation()Indicates if this  JavaClassis anAnnotation. | 
| boolean | isArray()Indicates if this  JavaClassis an Array type. | 
| boolean | isAssignableFrom(JavaClass javaClass)Indicates if this  JavaClassis either the same as, or is a superclass of,
 thejavaClassargument. | 
| boolean | isEnum()Indicates if this  JavaClassis anenum. | 
| boolean | isFinal()Indicates if this  JavaClassisfinal. | 
| boolean | isInterface()Indicates if this  JavaClassis aninterface. | 
| boolean | isMemberClass()Indicates if this  JavaClassis an innerClass. | 
| boolean | isPrimitive()Indicates if this  JavaClassrepresents a primitive type. | 
| boolean | isPrivate()Indicates if this  JavaClassisprivate. | 
| boolean | isProtected()Indicates if this  JavaClassisprotected. | 
| boolean | isPublic()Indicates if this  JavaClassispublic. | 
| boolean | isStatic()Indicates if this  JavaClassisstatic. | 
| boolean | isSynthetic()Not supported. | 
| void | setActualTypeArgument(JavaClass javaClass) | 
| void | setJavaModel(JavaModel javaModel)Set this  JavaClass'JavaModel. | 
public XJCJavaClassImpl(com.sun.codemodel.JDefinedClass jDefinedClass,
                        com.sun.codemodel.JCodeModel codeModel,
                        DynamicClassLoader loader)
XJCJavaClassImpl.jDefinedClass - - the XJC JDefinedClass to be wrapped.codeModel - - the XJC JCodeModel this class belongs to.loader - - the ClassLoader used to bootstrap the DynamicJAXBContext.public XJCJavaClassImpl(com.sun.codemodel.JDefinedClass jDefinedClass,
                        com.sun.codemodel.JCodeModel codeModel,
                        DynamicClassLoader loader,
                        boolean isArray,
                        boolean isPrimitive)
XJCJavaClassImpl.jDefinedClass - - the XJC JDefinedClass to be wrapped.codeModel - - the XJC JCodeModel this class belongs to.loader - - the ClassLoader used to bootstrap the DynamicJAXBContext.isArray - - indicates that this class is an array type.isPrimitive - - indicates that this class is a primitive type.public void setActualTypeArgument(JavaClass javaClass)
public 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 JavaClassJavaClass of this array's component type, or null if
         this is not an array type.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 Collection<JavaConstructor> getConstructors()
JavaConstructors for this JavaClass.getConstructors in interface JavaClassCollection containing this JavaClass' JavaConstructors.public Collection<JavaClass> getDeclaredClasses()
JavaClass' inner classes.getDeclaredClasses in interface JavaClassCollection<JavaClass> containing this JavaClass' inner classes.public JavaConstructor getDeclaredConstructor(JavaClass[] parameterTypes)
JavaConstructor for this JavaClass that has the
 provided parameter types.getDeclaredConstructor in interface JavaClassparameterTypes - the parameter list used to identify the constructor.JavaConstructor with the signature matching parameterTypes.public Collection<JavaConstructor> getDeclaredConstructors()
JavaConstructors for this JavaClass.getDeclaredConstructors in interface JavaClassCollection containing this JavaClass' JavaConstructors.public JavaField getDeclaredField(String fieldName)
JavaField for this JavaClass, identified
 by fieldName.getDeclaredField in interface JavaClassfieldName - the name of the JavaField to return.JavaField named fieldName from this JavaClass.public Collection<JavaField> getDeclaredFields()
JavaFields for this JavaClass.getDeclaredFields in interface JavaClassCollection containing this JavaClass' JavaFields.public JavaMethod getDeclaredMethod(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.JavaMethod from this JavaClass.public Collection<JavaMethod> getDeclaredMethods()
JavaMethods for this JavaClass.getDeclaredMethods in interface JavaClassCollection containing this JavaClass' JavaMethods.public JavaMethod getMethod(String name, JavaClass[] args)
JavaMethod for this JavaClass, identified
 by name, with the signature matching args.public Collection<JavaMethod> getMethods()
JavaMethods for this JavaClass.getMethods in interface JavaClassCollection containing this JavaClass' JavaMethods.public int getModifiers()
JavaClass, encoded in an integer.getModifiers in interface JavaClassint representing the modifiers for this class.Modifierpublic String getName()
JavaClass.public JavaPackage getPackage()
JavaPackage that this JavaClass belongs to.getPackage in interface JavaClassJavaPackage of this JavaClass.public String getPackageName()
JavaClass.getPackageName in interface JavaClassString name of this JavaClass' JavaPackage.public String getQualifiedName()
JavaClass.getQualifiedName in interface JavaClassString name of this JavaClass.public 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 Type[] getGenericInterfaces()
getGenericInterfaces in interface JavaClasspublic 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 JavaClasstrue if this JavaClass is parameterized, otherwise false.public boolean isAbstract()
JavaClass is abstract.isAbstract in interface JavaClasstrue if this JavaClass is abstract, otherwise false.public boolean isAnnotation()
JavaClass is an Annotation.isAnnotation in interface JavaClasstrue if this JavaClass is an Annotation, otherwise false.public boolean isArray()
JavaClass is an Array type.public boolean isAssignableFrom(JavaClass javaClass)
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 JavaClassInstanceOf instanceOf()
instanceOf 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.JavaAnnotation represented by aClass, if one exists, otherwise return null.public Collection<JavaAnnotation> getAnnotations()
Annotations for this JavaClass.getAnnotations in interface JavaHasAnnotationsCollection containing this JavaClass' JavaAnnotations.public JavaAnnotation getDeclaredAnnotation(JavaClass arg0)
getDeclaredAnnotation in interface JavaHasAnnotationspublic Collection<JavaAnnotation> getDeclaredAnnotations()
getDeclaredAnnotations in interface JavaHasAnnotationspublic JavaModel getJavaModel()
JavaClass' JavaModel.JavaModel associated with this JavaClass.public void setJavaModel(JavaModel javaModel)
JavaClass' JavaModel.javaModel - The JavaModel to set.Copyright © 2007–2021 Eclipse.org - EclipseLink Project. All rights reserved.