EclipseLink 2.4.2, build 'v20130514-5956486' API Reference

org.eclipse.persistence.jaxb.javamodel.xjc
Class XJCJavaMethodImpl

java.lang.Object
  extended by 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's JMethod. Used when bootstrapping a DynamicJAXBContext from an XML Schema.

Responsibilities:

See Also:
JavaMethod
Since:
EclipseLink 2.1

Constructor Summary
XJCJavaMethodImpl(JMethod javaMethod, JCodeModel codeModel, DynamicClassLoader loader, JavaClass owner)
          Construct a new instance of XJCJavaMethodImpl.
 
Method Summary
 java.util.Collection<java.lang.Object> getActualTypeArguments()
          Not supported.
 JavaAnnotation getAnnotation(JavaClass aClass)
          If this JavaMethod is annotated with an Annotation matching aClass, return its JavaAnnotation representation.
 java.util.Collection<JavaAnnotation> getAnnotations()
          Return all of the Annotations for this JavaMethod.
 JavaAnnotation getDeclaredAnnotation(JavaClass arg0)
          Not supported.
 java.util.Collection<JavaAnnotation> getDeclaredAnnotations()
          Not supported.
 int getModifiers()
          Returns the Java language modifiers for this JavaMethod, encoded in an integer.
 java.lang.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. is a parameterized type (for example, List<Employee).
 boolean isAbstract()
          Indicates if this JavaMethod is abstract.
 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.
 
Methods inherited from class java.lang.Object
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait
 

Constructor Detail

XJCJavaMethodImpl

public XJCJavaMethodImpl(JMethod javaMethod,
                         JCodeModel codeModel,
                         DynamicClassLoader loader,
                         JavaClass owner)
Construct a new instance of XJCJavaMethodImpl.

Parameters:
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.
Method Detail

getAnnotation

public JavaAnnotation getAnnotation(JavaClass aClass)
If this JavaMethod is annotated with an Annotation matching aClass, return its JavaAnnotation representation.

Specified by:
getAnnotation in interface JavaHasAnnotations
Parameters:
aClass - a JavaClass representing the Annotation to look for.
Returns:
the JavaAnnotation represented by aClass, if one exists, otherwise return null.

getAnnotations

public java.util.Collection<JavaAnnotation> getAnnotations()
Return all of the Annotations for this JavaMethod.

Specified by:
getAnnotations in interface JavaHasAnnotations
Returns:
A Collection containing this JavaMethod's JavaAnnotations.

getName

public java.lang.String getName()
Returns the name of this JavaMethod.

Specified by:
getName in interface JavaMethod
Returns:
the String name of this JavaMethod.

getParameterTypes

public JavaClass[] getParameterTypes()
Returns the array of parameters for this JavaMethod.

Specified by:
getParameterTypes in interface JavaMethod
Returns:
a JavaClass[] representing the argument types for this method.

getResolvedType

public JavaClass getResolvedType()
Returns this JavaMethod's return type.

Returns:
a JavaClass representing the return type of this method.

getReturnType

public JavaClass getReturnType()
Returns this JavaMethod's return type.

Specified by:
getReturnType in interface JavaMethod
Returns:
a JavaClass representing the return type of this method.

hasActualTypeArguments

public boolean hasActualTypeArguments()
Indicates if this JavaMethod has actual type arguments, i.e. is a parameterized type (for example, List<Employee).

Returns:
true if this JavaClass is parameterized, otherwise false.

getActualTypeArguments

public java.util.Collection<java.lang.Object> getActualTypeArguments()
Not supported.


getModifiers

public int getModifiers()
Returns the Java language modifiers for this JavaMethod, encoded in an integer.

Specified by:
getModifiers in interface JavaMethod
Returns:
the int representing the modifiers for this method.
See Also:
Modifier

isAbstract

public boolean isAbstract()
Indicates if this JavaMethod is abstract.

Specified by:
isAbstract in interface JavaMethod
Returns:
true if this JavaMethod is abstract, otherwise false.

isPrivate

public boolean isPrivate()
Indicates if this JavaMethod is private.

Specified by:
isPrivate in interface JavaMethod
Returns:
true if this JavaMethod is private, otherwise false.

isProtected

public boolean isProtected()
Indicates if this JavaMethod is protected.

Specified by:
isProtected in interface JavaMethod
Returns:
true if this JavaMethod is protected, otherwise false.

isPublic

public boolean isPublic()
Indicates if this JavaMethod is public.

Specified by:
isPublic in interface JavaMethod
Returns:
true if this JavaMethod is public, otherwise false.

isStatic

public boolean isStatic()
Indicates if this JavaMethod is static.

Specified by:
isStatic in interface JavaMethod
Returns:
true if this JavaMethod is static, otherwise false.

isFinal

public boolean isFinal()
Indicates if this JavaMethod is final.

Specified by:
isFinal in interface JavaMethod
Returns:
true if this JavaMethod is final, otherwise false.

isSynthetic

public boolean isSynthetic()
Not supported.

Specified by:
isSynthetic in interface JavaMethod

getDeclaredAnnotation

public JavaAnnotation getDeclaredAnnotation(JavaClass arg0)
Not supported.

Specified by:
getDeclaredAnnotation in interface JavaHasAnnotations

getDeclaredAnnotations

public java.util.Collection<JavaAnnotation> getDeclaredAnnotations()
Not supported.

Specified by:
getDeclaredAnnotations in interface JavaHasAnnotations

getOwningClass

public JavaClass getOwningClass()
Returns the JavaClass which contains this method.

Specified by:
getOwningClass in interface JavaMethod
Returns:
JavaClass representing the owner of this JavaMethod.

setOwningClass

public void setOwningClass(JavaClass owningClass)
Set the JavaClass which contains this method.

Parameters:
owningClass - the JavaClass representing the owner of this JavaMethod.

EclipseLink 2.4.2, build 'v20130514-5956486' API Reference