Class XJCJavaMethodImpl
- java.lang.Object
-
- org.eclipse.persistence.jaxb.javamodel.xjc.XJCJavaMethodImpl
-
- All Implemented Interfaces:
JavaHasAnnotations,JavaMethod
public class XJCJavaMethodImpl extends java.lang.Object implements JavaMethod
INTERNAL:Purpose:
JavaMethodimplementation wrapping XJC'sJMethod. Used when bootstrapping aDynamicJAXBContextfrom an XML Schema.Responsibilities:
- Provide
Methodinformation from the underlyingJMethod.
- See Also:
JavaMethod- Since:
- EclipseLink 2.1
-
-
Constructor Summary
Constructors Constructor Description XJCJavaMethodImpl(com.sun.codemodel.JMethod javaMethod, com.sun.codemodel.JCodeModel codeModel, DynamicClassLoader loader, JavaClass owner)Construct a new instance ofXJCJavaMethodImpl.
-
Method Summary
All Methods Instance Methods Concrete Methods Modifier and Type Method Description java.util.Collection<java.lang.Object>getActualTypeArguments()Not supported.JavaAnnotationgetAnnotation(JavaClass aClass)If thisJavaMethodis annotated with anAnnotationmatchingaClass, return itsJavaAnnotationrepresentation.java.util.Collection<JavaAnnotation>getAnnotations()Return all of theAnnotationsfor thisJavaMethod.JavaAnnotationgetDeclaredAnnotation(JavaClass arg0)Not supported.java.util.Collection<JavaAnnotation>getDeclaredAnnotations()Not supported.intgetModifiers()Returns the Java language modifiers for thisJavaMethod, encoded in an integer.java.lang.StringgetName()Returns the name of thisJavaMethod.JavaClassgetOwningClass()Returns theJavaClasswhich contains this method.JavaClass[]getParameterTypes()Returns the array of parameters for thisJavaMethod.JavaClassgetResolvedType()Returns thisJavaMethod'sreturn type.JavaClassgetReturnType()Returns thisJavaMethod'sreturn type.booleanhasActualTypeArguments()Indicates if thisJavaMethodhas actual type arguments, i.e. is a parameterized type (for example,List<Employee).booleanisAbstract()Indicates if thisJavaMethodisabstract.booleanisBridge()Not supported.booleanisFinal()Indicates if thisJavaMethodisfinal.booleanisPrivate()Indicates if thisJavaMethodisprivate.booleanisProtected()Indicates if thisJavaMethodisprotected.booleanisPublic()Indicates if thisJavaMethodispublic.booleanisStatic()Indicates if thisJavaMethodisstatic.booleanisSynthetic()Not supported.voidsetOwningClass(JavaClass owningClass)Set theJavaClasswhich contains this method.
-
-
-
Constructor Detail
-
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 Detail
-
getAnnotation
public JavaAnnotation getAnnotation(JavaClass aClass)
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
public java.util.Collection<JavaAnnotation> getAnnotations()
Return all of theAnnotationsfor thisJavaMethod.- Specified by:
getAnnotationsin interfaceJavaHasAnnotations- Returns:
- A
Collectioncontaining thisJavaMethod'sJavaAnnotations.
-
getName
public java.lang.String getName()
Returns the name of thisJavaMethod.- Specified by:
getNamein interfaceJavaMethod- Returns:
- the
Stringname of thisJavaMethod.
-
getParameterTypes
public JavaClass[] getParameterTypes()
Returns the array of parameters for thisJavaMethod.- Specified by:
getParameterTypesin interfaceJavaMethod- Returns:
- a
JavaClass[]representing the argument types for this method.
-
getResolvedType
public JavaClass getResolvedType()
Returns thisJavaMethod'sreturn type.- Returns:
- a
JavaClassrepresenting the return type of this method.
-
getReturnType
public JavaClass 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
public java.util.Collection<java.lang.Object> 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:
Modifier
-
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
public JavaAnnotation getDeclaredAnnotation(JavaClass arg0)
Not supported.- Specified by:
getDeclaredAnnotationin interfaceJavaHasAnnotations
-
getDeclaredAnnotations
public java.util.Collection<JavaAnnotation> getDeclaredAnnotations()
Not supported.- Specified by:
getDeclaredAnnotationsin interfaceJavaHasAnnotations
-
getOwningClass
public JavaClass getOwningClass()
Returns theJavaClasswhich contains this method.- Specified by:
getOwningClassin interfaceJavaMethod- Returns:
JavaClassrepresenting the owner of thisJavaMethod.
-
setOwningClass
public void setOwningClass(JavaClass owningClass)
Set theJavaClasswhich contains this method.- Parameters:
owningClass- theJavaClassrepresenting the owner of thisJavaMethod.
-
isBridge
public boolean isBridge()
Not supported.- Specified by:
isBridgein interfaceJavaMethod
-
-