Class XJCJavaConstructorImpl
- java.lang.Object
-
- org.eclipse.persistence.jaxb.javamodel.xjc.XJCJavaConstructorImpl
-
- All Implemented Interfaces:
JavaConstructor
public class XJCJavaConstructorImpl extends java.lang.Object implements JavaConstructor
INTERNAL:Purpose:
JavaConstructor
implementation wrapping XJC'sJMethod
. Used when bootstrapping aDynamicJAXBContext
from an XML Schema.Responsibilities:
- Provide
Constructor
information from the underlyingJMethod
.
- See Also:
JavaConstructor
- Since:
- EclipseLink 2.1
-
-
Constructor Summary
Constructors Constructor Description XJCJavaConstructorImpl(com.sun.codemodel.JMethod constructor, com.sun.codemodel.JCodeModel codeModel, DynamicClassLoader loader, JavaClass owner)
Construct a new instance ofXJCJavaConstructorImpl
.
-
Method Summary
All Methods Instance Methods Concrete Methods Modifier and Type Method Description int
getModifiers()
Returns the Java language modifiers for thisJavaConstructor
, encoded in an integer.java.lang.String
getName()
Returns the name of thisJavaConstructor
.JavaClass
getOwningClass()
Returns theJavaClass
which contains this constructor.JavaClass[]
getParameterTypes()
Returns the array of parameters for thisJavaConstructor
.boolean
isAbstract()
Indicates if thisJavaConstructor
isabstract
.boolean
isFinal()
Indicates if thisJavaConstructor
isfinal
.boolean
isPrivate()
Indicates if thisJavaConstructor
isprivate
.boolean
isProtected()
Indicates if thisJavaConstructor
isprotected
.boolean
isPublic()
Indicates if thisJavaConstructor
ispublic
.boolean
isStatic()
Indicates if thisJavaConstructor
isstatic
.boolean
isSynthetic()
Not supported.void
setOwningClass(JavaClass owningClass)
Set theJavaClass
which contains this constructor.
-
-
-
Constructor Detail
-
XJCJavaConstructorImpl
public XJCJavaConstructorImpl(com.sun.codemodel.JMethod constructor, com.sun.codemodel.JCodeModel codeModel, DynamicClassLoader loader, JavaClass owner)
Construct a new instance ofXJCJavaConstructorImpl
.- Parameters:
constructor
- - the XJCJMethod
to be wrapped.codeModel
- - the XJCJCodeModel
this constructor belongs to.loader
- - theClassLoader
used to bootstrap theDynamicJAXBContext
.owner
- - theJavaClass
this constructor belongs to.
-
-
Method Detail
-
getModifiers
public int getModifiers()
Returns the Java language modifiers for thisJavaConstructor
, encoded in an integer.- Specified by:
getModifiers
in interfaceJavaConstructor
- Returns:
- the
int
representing the modifiers for this constructor. - See Also:
Modifier
-
getName
public java.lang.String getName()
Returns the name of thisJavaConstructor
.- Specified by:
getName
in interfaceJavaConstructor
- Returns:
- the
String
name of thisJavaConstructor
.
-
getParameterTypes
public JavaClass[] getParameterTypes()
Returns the array of parameters for thisJavaConstructor
.- Specified by:
getParameterTypes
in interfaceJavaConstructor
- Returns:
- a
JavaClass[]
representing the argument types for this constructor.
-
isAbstract
public boolean isAbstract()
Indicates if thisJavaConstructor
isabstract
.- Specified by:
isAbstract
in interfaceJavaConstructor
- Returns:
true
if thisJavaConstructor
isabstract
, otherwisefalse
.
-
isPrivate
public boolean isPrivate()
Indicates if thisJavaConstructor
isprivate
.- Specified by:
isPrivate
in interfaceJavaConstructor
- Returns:
true
if thisJavaConstructor
isprivate
, otherwisefalse
.
-
isProtected
public boolean isProtected()
Indicates if thisJavaConstructor
isprotected
.- Specified by:
isProtected
in interfaceJavaConstructor
- Returns:
true
if thisJavaConstructor
isprotected
, otherwisefalse
.
-
isPublic
public boolean isPublic()
Indicates if thisJavaConstructor
ispublic
.- Specified by:
isPublic
in interfaceJavaConstructor
- Returns:
true
if thisJavaConstructor
ispublic
, otherwisefalse
.
-
isStatic
public boolean isStatic()
Indicates if thisJavaConstructor
isstatic
.- Specified by:
isStatic
in interfaceJavaConstructor
- Returns:
true
if thisJavaConstructor
isstatic
, otherwisefalse
.
-
isFinal
public boolean isFinal()
Indicates if thisJavaConstructor
isfinal
.- Specified by:
isFinal
in interfaceJavaConstructor
- Returns:
true
if thisJavaConstructor
isfinal
, otherwisefalse
.
-
isSynthetic
public boolean isSynthetic()
Not supported.- Specified by:
isSynthetic
in interfaceJavaConstructor
-
getOwningClass
public JavaClass getOwningClass()
Returns theJavaClass
which contains this constructor.- Specified by:
getOwningClass
in interfaceJavaConstructor
- Returns:
JavaClass
representing the owner of thisJavaConstructor
.
-
setOwningClass
public void setOwningClass(JavaClass owningClass)
Set theJavaClass
which contains this constructor.- Parameters:
owningClass
- theJavaClass
representing the owner of thisJavaConstructor
.
-
-