public class XJCJavaMethodImpl extends Object implements JavaMethod
Purpose: JavaMethod implementation wrapping XJC's JMethod. Used when
bootstrapping a DynamicJAXBContext from an XML Schema.
Responsibilities:
Method information from the underlying JMethod.JavaMethod| Constructor and Description |
|---|
XJCJavaMethodImpl(com.sun.codemodel.JMethod javaMethod,
com.sun.codemodel.JCodeModel codeModel,
DynamicClassLoader loader,
JavaClass owner)
Construct a new instance of
XJCJavaMethodImpl. |
| Modifier and Type | Method and Description |
|---|---|
Collection<Object> |
getActualTypeArguments()
Not supported.
|
JavaAnnotation |
getAnnotation(JavaClass aClass)
If this
JavaMethod is annotated with an Annotation matching aClass,
return its JavaAnnotation representation. |
Collection<JavaAnnotation> |
getAnnotations()
Return all of the
Annotations for this JavaMethod. |
JavaAnnotation |
getDeclaredAnnotation(JavaClass arg0)
Not supported.
|
Collection<JavaAnnotation> |
getDeclaredAnnotations()
Not supported.
|
int |
getModifiers()
Returns the Java language modifiers for this
JavaMethod, encoded in an integer. |
String |
getName()
Returns the name of this
JavaMethod. |
JavaClass |
getOwningClass()
Returns the
JavaClass which contains this method. |
JavaClass[] |
getParameterTypes()
Returns the array of parameters for this
JavaMethod. |
JavaClass |
getResolvedType()
Returns this
JavaMethod's return type. |
JavaClass |
getReturnType()
Returns this
JavaMethod's return type. |
boolean |
hasActualTypeArguments()
Indicates if this
JavaMethod has actual type arguments, i.e. |
boolean |
isAbstract()
Indicates if this
JavaMethod is abstract. |
boolean |
isBridge()
Not supported.
|
boolean |
isFinal()
Indicates if this
JavaMethod is final. |
boolean |
isPrivate()
Indicates if this
JavaMethod is private. |
boolean |
isProtected()
Indicates if this
JavaMethod is protected. |
boolean |
isPublic()
Indicates if this
JavaMethod is public. |
boolean |
isStatic()
Indicates if this
JavaMethod is static. |
boolean |
isSynthetic()
Not supported.
|
void |
setOwningClass(JavaClass owningClass)
Set the
JavaClass which contains this method. |
public XJCJavaMethodImpl(com.sun.codemodel.JMethod javaMethod,
com.sun.codemodel.JCodeModel codeModel,
DynamicClassLoader loader,
JavaClass owner)
XJCJavaMethodImpl.javaMethod - - the XJC JMethod to be wrapped.codeModel - - the XJC JCodeModel this method belongs to.loader - - the ClassLoader used to bootstrap the DynamicJAXBContext.owner - - the JavaClass this method belongs to.public JavaAnnotation getAnnotation(JavaClass aClass)
JavaMethod 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 JavaMethod.getAnnotations in interface JavaHasAnnotationsCollection containing this JavaMethod's JavaAnnotations.public String getName()
JavaMethod.getName in interface JavaMethodString name of this JavaMethod.public JavaClass[] getParameterTypes()
JavaMethod.getParameterTypes in interface JavaMethodJavaClass[] representing the argument types for this method.public JavaClass getResolvedType()
JavaMethod's return type.JavaClass representing the return type of this method.public JavaClass getReturnType()
JavaMethod's return type.getReturnType in interface JavaMethodJavaClass representing the return type of this method.public boolean hasActualTypeArguments()
JavaMethod has actual type arguments, i.e. is a
parameterized type (for example, List<Employee).true if this JavaClass is parameterized, otherwise false.public Collection<Object> getActualTypeArguments()
public int getModifiers()
JavaMethod, encoded in an integer.getModifiers in interface JavaMethodint representing the modifiers for this method.Modifierpublic boolean isAbstract()
JavaMethod is abstract.isAbstract in interface JavaMethodtrue if this JavaMethod is abstract, otherwise false.public boolean isPrivate()
JavaMethod is private.isPrivate in interface JavaMethodtrue if this JavaMethod is private, otherwise false.public boolean isProtected()
JavaMethod is protected.isProtected in interface JavaMethodtrue if this JavaMethod is protected, otherwise false.public boolean isPublic()
JavaMethod is public.isPublic in interface JavaMethodtrue if this JavaMethod is public, otherwise false.public boolean isStatic()
JavaMethod is static.isStatic in interface JavaMethodtrue if this JavaMethod is static, otherwise false.public boolean isFinal()
JavaMethod is final.isFinal in interface JavaMethodtrue if this JavaMethod is final, otherwise false.public boolean isSynthetic()
isSynthetic in interface JavaMethodpublic JavaAnnotation getDeclaredAnnotation(JavaClass arg0)
getDeclaredAnnotation in interface JavaHasAnnotationspublic Collection<JavaAnnotation> getDeclaredAnnotations()
getDeclaredAnnotations in interface JavaHasAnnotationspublic JavaClass getOwningClass()
JavaClass which contains this method.getOwningClass in interface JavaMethodJavaClass representing the owner of this JavaMethod.public void setOwningClass(JavaClass owningClass)
JavaClass which contains this method.owningClass - the JavaClass representing the owner of this JavaMethod.public boolean isBridge()
isBridge in interface JavaMethodCopyright © 2007–2021 Eclipse.org - EclipseLink Project. All rights reserved.