Module org.eclipse.persistence.moxy
Class XJCJavaMethodImpl
java.lang.Object
org.eclipse.persistence.jaxb.javamodel.xjc.XJCJavaMethodImpl
- All Implemented Interfaces:
JavaHasAnnotations,JavaMethod
INTERNAL:
Purpose: JavaMethod implementation wrapping XJC's JMethod. Used when
bootstrapping a DynamicJAXBContext from an XML Schema.
Responsibilities:
- Provide
Methodinformation from the underlyingJMethod.
- Since:
- EclipseLink 2.1
- See Also:
-
Constructor Summary
ConstructorsConstructorDescriptionXJCJavaMethodImpl(com.sun.codemodel.JMethod javaMethod, com.sun.codemodel.JCodeModel codeModel, DynamicClassLoader loader, JavaClass owner) Construct a new instance ofXJCJavaMethodImpl. -
Method Summary
Modifier and TypeMethodDescriptionNot supported.getAnnotation(JavaClass aClass) If thisJavaMethodis annotated with anAnnotationmatchingaClass, return itsJavaAnnotationrepresentation.Return all of theAnnotationsfor thisJavaMethod.Not supported.Not supported.intReturns the Java language modifiers for thisJavaMethod, encoded in an integer.getName()Returns the name of thisJavaMethod.Returns theJavaClasswhich contains this method.Returns the array of parameters for thisJavaMethod.Returns thisJavaMethod'sreturn type.Returns thisJavaMethod'sreturn type.booleanIndicates if thisJavaMethodhas actual type arguments, i.e.booleanIndicates if thisJavaMethodisabstract.booleanisBridge()Not supported.booleanisFinal()Indicates if thisJavaMethodisfinal.booleanIndicates if thisJavaMethodisprivate.booleanIndicates if thisJavaMethodisprotected.booleanisPublic()Indicates if thisJavaMethodispublic.booleanisStatic()Indicates if thisJavaMethodisstatic.booleanNot supported.voidsetOwningClass(JavaClass owningClass) Set theJavaClasswhich contains this method.
-
Constructor Details
-
XJCJavaMethodImpl
public XJCJavaMethodImpl(com.sun.codemodel.JMethod javaMethod, com.sun.codemodel.JCodeModel codeModel, DynamicClassLoader loader, JavaClass owner) Construct a new instance ofXJCJavaMethodImpl.- Parameters:
javaMethod- - the XJCJMethodto be wrapped.codeModel- - the XJCJCodeModelthis method belongs to.loader- - theClassLoaderused to bootstrap theDynamicJAXBContext.owner- - theJavaClassthis method belongs to.
-
-
Method Details
-
getAnnotation
If thisJavaMethodis annotated with anAnnotationmatchingaClass, return itsJavaAnnotationrepresentation.- Specified by:
getAnnotationin interfaceJavaHasAnnotations- Parameters:
aClass- aJavaClassrepresenting theAnnotationto look for.- Returns:
- the
JavaAnnotationrepresented byaClass, if one exists, otherwise returnnull.
-
getAnnotations
Return all of theAnnotationsfor thisJavaMethod.- Specified by:
getAnnotationsin interfaceJavaHasAnnotations- Returns:
- A
Collectioncontaining thisJavaMethod'sJavaAnnotations.
-
getName
Returns the name of thisJavaMethod.- Specified by:
getNamein interfaceJavaMethod- Returns:
- the
Stringname of thisJavaMethod.
-
getParameterTypes
Returns the array of parameters for thisJavaMethod.- Specified by:
getParameterTypesin interfaceJavaMethod- Returns:
- a
JavaClass[]representing the argument types for this method.
-
getResolvedType
Returns thisJavaMethod'sreturn type.- Returns:
- a
JavaClassrepresenting the return type of this method.
-
getReturnType
Returns thisJavaMethod'sreturn type.- Specified by:
getReturnTypein interfaceJavaMethod- Returns:
- a
JavaClassrepresenting the return type of this method.
-
hasActualTypeArguments
public boolean hasActualTypeArguments()Indicates if thisJavaMethodhas actual type arguments, i.e. is a parameterized type (for example,List<Employee).- Returns:
trueif thisJavaClassis parameterized, otherwisefalse.
-
getActualTypeArguments
Not supported. -
getModifiers
public int getModifiers()Returns the Java language modifiers for thisJavaMethod, encoded in an integer.- Specified by:
getModifiersin interfaceJavaMethod- Returns:
- the
intrepresenting the modifiers for this method. - See Also:
-
isAbstract
public boolean isAbstract()Indicates if thisJavaMethodisabstract.- Specified by:
isAbstractin interfaceJavaMethod- Returns:
trueif thisJavaMethodisabstract, otherwisefalse.
-
isPrivate
public boolean isPrivate()Indicates if thisJavaMethodisprivate.- Specified by:
isPrivatein interfaceJavaMethod- Returns:
trueif thisJavaMethodisprivate, otherwisefalse.
-
isProtected
public boolean isProtected()Indicates if thisJavaMethodisprotected.- Specified by:
isProtectedin interfaceJavaMethod- Returns:
trueif thisJavaMethodisprotected, otherwisefalse.
-
isPublic
public boolean isPublic()Indicates if thisJavaMethodispublic.- Specified by:
isPublicin interfaceJavaMethod- Returns:
trueif thisJavaMethodispublic, otherwisefalse.
-
isStatic
public boolean isStatic()Indicates if thisJavaMethodisstatic.- Specified by:
isStaticin interfaceJavaMethod- Returns:
trueif thisJavaMethodisstatic, otherwisefalse.
-
isFinal
public boolean isFinal()Indicates if thisJavaMethodisfinal.- Specified by:
isFinalin interfaceJavaMethod- Returns:
trueif thisJavaMethodisfinal, otherwisefalse.
-
isSynthetic
public boolean isSynthetic()Not supported.- Specified by:
isSyntheticin interfaceJavaMethod
-
getDeclaredAnnotation
Not supported.- Specified by:
getDeclaredAnnotationin interfaceJavaHasAnnotations
-
getDeclaredAnnotations
Not supported.- Specified by:
getDeclaredAnnotationsin interfaceJavaHasAnnotations
-
getOwningClass
Returns theJavaClasswhich contains this method.- Specified by:
getOwningClassin interfaceJavaMethod- Returns:
JavaClassrepresenting the owner of thisJavaMethod.
-
setOwningClass
Set theJavaClasswhich contains this method.- Parameters:
owningClass- theJavaClassrepresenting the owner of thisJavaMethod.
-
isBridge
public boolean isBridge()Not supported.- Specified by:
isBridgein interfaceJavaMethod
-