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:
JavaMethod
implementation wrapping XJC'sJMethod
. Used when bootstrapping aDynamicJAXBContext
from an XML Schema.Responsibilities:
- Provide
Method
information 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.JavaAnnotation
getAnnotation(JavaClass aClass)
If thisJavaMethod
is annotated with anAnnotation
matchingaClass
, return itsJavaAnnotation
representation.java.util.Collection<JavaAnnotation>
getAnnotations()
Return all of theAnnotations
for thisJavaMethod
.JavaAnnotation
getDeclaredAnnotation(JavaClass arg0)
Not supported.java.util.Collection<JavaAnnotation>
getDeclaredAnnotations()
Not supported.int
getModifiers()
Returns the Java language modifiers for thisJavaMethod
, encoded in an integer.java.lang.String
getName()
Returns the name of thisJavaMethod
.JavaClass
getOwningClass()
Returns theJavaClass
which contains this method.JavaClass[]
getParameterTypes()
Returns the array of parameters for thisJavaMethod
.JavaClass
getResolvedType()
Returns thisJavaMethod's
return type.JavaClass
getReturnType()
Returns thisJavaMethod's
return type.boolean
hasActualTypeArguments()
Indicates if thisJavaMethod
has actual type arguments, i.e. is a parameterized type (for example,List<Employee
).boolean
isAbstract()
Indicates if thisJavaMethod
isabstract
.boolean
isBridge()
Not supported.boolean
isFinal()
Indicates if thisJavaMethod
isfinal
.boolean
isPrivate()
Indicates if thisJavaMethod
isprivate
.boolean
isProtected()
Indicates if thisJavaMethod
isprotected
.boolean
isPublic()
Indicates if thisJavaMethod
ispublic
.boolean
isStatic()
Indicates if thisJavaMethod
isstatic
.boolean
isSynthetic()
Not supported.void
setOwningClass(JavaClass owningClass)
Set theJavaClass
which 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 XJCJMethod
to be wrapped.codeModel
- - the XJCJCodeModel
this method belongs to.loader
- - theClassLoader
used to bootstrap theDynamicJAXBContext
.owner
- - theJavaClass
this method belongs to.
-
-
Method Detail
-
getAnnotation
public JavaAnnotation getAnnotation(JavaClass aClass)
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
public java.util.Collection<JavaAnnotation> getAnnotations()
Return all of theAnnotations
for thisJavaMethod
.- Specified by:
getAnnotations
in interfaceJavaHasAnnotations
- Returns:
- A
Collection
containing thisJavaMethod's
JavaAnnotations
.
-
getName
public java.lang.String getName()
Returns the name of thisJavaMethod
.- Specified by:
getName
in interfaceJavaMethod
- Returns:
- the
String
name of thisJavaMethod
.
-
getParameterTypes
public JavaClass[] getParameterTypes()
Returns the array of parameters for thisJavaMethod
.- Specified by:
getParameterTypes
in interfaceJavaMethod
- Returns:
- a
JavaClass[]
representing the argument types for this method.
-
getResolvedType
public JavaClass getResolvedType()
Returns thisJavaMethod's
return type.- Returns:
- a
JavaClass
representing the return type of this method.
-
getReturnType
public JavaClass 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
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:
getModifiers
in interfaceJavaMethod
- Returns:
- the
int
representing the modifiers for this method. - See Also:
Modifier
-
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
public JavaAnnotation getDeclaredAnnotation(JavaClass arg0)
Not supported.- Specified by:
getDeclaredAnnotation
in interfaceJavaHasAnnotations
-
getDeclaredAnnotations
public java.util.Collection<JavaAnnotation> getDeclaredAnnotations()
Not supported.- Specified by:
getDeclaredAnnotations
in interfaceJavaHasAnnotations
-
getOwningClass
public JavaClass getOwningClass()
Returns theJavaClass
which contains this method.- Specified by:
getOwningClass
in interfaceJavaMethod
- Returns:
JavaClass
representing the owner of thisJavaMethod
.
-
setOwningClass
public void setOwningClass(JavaClass owningClass)
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
-
-