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
Method
information from the underlyingJMethod
.
- Since:
- EclipseLink 2.1
- See Also:
-
Constructor Summary
ConstructorDescriptionXJCJavaMethodImpl
(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 thisJavaMethod
is annotated with anAnnotation
matchingaClass
, return itsJavaAnnotation
representation.Return all of theAnnotations
for thisJavaMethod
.Not supported.Not supported.int
Returns the Java language modifiers for thisJavaMethod
, encoded in an integer.getName()
Returns the name of thisJavaMethod
.Returns theJavaClass
which contains this method.Returns the array of parameters for thisJavaMethod
.Returns thisJavaMethod's
return type.Returns thisJavaMethod's
return type.boolean
Indicates if thisJavaMethod
has actual type arguments, i.e.boolean
Indicates if thisJavaMethod
isabstract
.boolean
isBridge()
Not supported.boolean
isFinal()
Indicates if thisJavaMethod
isfinal
.boolean
Indicates if thisJavaMethod
isprivate
.boolean
Indicates if thisJavaMethod
isprotected
.boolean
isPublic()
Indicates if thisJavaMethod
ispublic
.boolean
isStatic()
Indicates if thisJavaMethod
isstatic
.boolean
Not supported.void
setOwningClass
(JavaClass owningClass) Set theJavaClass
which 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 XJCJMethod
to be wrapped.codeModel
- - the XJCJCodeModel
this method belongs to.loader
- - theClassLoader
used to bootstrap theDynamicJAXBContext
.owner
- - theJavaClass
this method belongs to.
-
-
Method Details
-
getAnnotation
If thisJavaMethod
is annotated with anAnnotation
matchingaClass
, return itsJavaAnnotation
representation.- Specified by:
getAnnotation
in interfaceJavaHasAnnotations
- Parameters:
aClass
- aJavaClass
representing theAnnotation
to look for.- Returns:
- the
JavaAnnotation
represented byaClass
, if one exists, otherwise returnnull
.
-
getAnnotations
Return all of theAnnotations
for thisJavaMethod
.- Specified by:
getAnnotations
in interfaceJavaHasAnnotations
- Returns:
- A
Collection
containing thisJavaMethod's
JavaAnnotations
.
-
getName
Returns the name of thisJavaMethod
.- Specified by:
getName
in interfaceJavaMethod
- Returns:
- the
String
name of thisJavaMethod
.
-
getParameterTypes
Returns the array of parameters for thisJavaMethod
.- Specified by:
getParameterTypes
in interfaceJavaMethod
- Returns:
- a
JavaClass[]
representing the argument types for this method.
-
getResolvedType
Returns thisJavaMethod's
return type.- Returns:
- a
JavaClass
representing the return type of this method.
-
getReturnType
Returns thisJavaMethod's
return type.- Specified by:
getReturnType
in interfaceJavaMethod
- Returns:
- a
JavaClass
representing the return type of this method.
-
hasActualTypeArguments
public boolean hasActualTypeArguments()Indicates if thisJavaMethod
has actual type arguments, i.e. is a parameterized type (for example,List<Employee
).- Returns:
true
if thisJavaClass
is parameterized, otherwisefalse
.
-
getActualTypeArguments
Not supported. -
getModifiers
public int getModifiers()Returns the Java language modifiers for thisJavaMethod
, encoded in an integer.- Specified by:
getModifiers
in interfaceJavaMethod
- Returns:
- the
int
representing the modifiers for this method. - See Also:
-
isAbstract
public boolean isAbstract()Indicates if thisJavaMethod
isabstract
.- Specified by:
isAbstract
in interfaceJavaMethod
- Returns:
true
if thisJavaMethod
isabstract
, otherwisefalse
.
-
isPrivate
public boolean isPrivate()Indicates if thisJavaMethod
isprivate
.- Specified by:
isPrivate
in interfaceJavaMethod
- Returns:
true
if thisJavaMethod
isprivate
, otherwisefalse
.
-
isProtected
public boolean isProtected()Indicates if thisJavaMethod
isprotected
.- Specified by:
isProtected
in interfaceJavaMethod
- Returns:
true
if thisJavaMethod
isprotected
, otherwisefalse
.
-
isPublic
public boolean isPublic()Indicates if thisJavaMethod
ispublic
.- Specified by:
isPublic
in interfaceJavaMethod
- Returns:
true
if thisJavaMethod
ispublic
, otherwisefalse
.
-
isStatic
public boolean isStatic()Indicates if thisJavaMethod
isstatic
.- Specified by:
isStatic
in interfaceJavaMethod
- Returns:
true
if thisJavaMethod
isstatic
, otherwisefalse
.
-
isFinal
public boolean isFinal()Indicates if thisJavaMethod
isfinal
.- Specified by:
isFinal
in interfaceJavaMethod
- Returns:
true
if thisJavaMethod
isfinal
, otherwisefalse
.
-
isSynthetic
public boolean isSynthetic()Not supported.- Specified by:
isSynthetic
in interfaceJavaMethod
-
getDeclaredAnnotation
Not supported.- Specified by:
getDeclaredAnnotation
in interfaceJavaHasAnnotations
-
getDeclaredAnnotations
Not supported.- Specified by:
getDeclaredAnnotations
in interfaceJavaHasAnnotations
-
getOwningClass
Returns theJavaClass
which contains this method.- Specified by:
getOwningClass
in interfaceJavaMethod
- Returns:
JavaClass
representing the owner of thisJavaMethod
.
-
setOwningClass
Set theJavaClass
which contains this method.- Parameters:
owningClass
- theJavaClass
representing the owner of thisJavaMethod
.
-
isBridge
public boolean isBridge()Not supported.- Specified by:
isBridge
in interfaceJavaMethod
-