Class XJCJavaConstructorImpl
java.lang.Object
org.eclipse.persistence.jaxb.javamodel.xjc.XJCJavaConstructorImpl
- All Implemented Interfaces:
JavaConstructor
INTERNAL:
Purpose: JavaConstructor
implementation wrapping XJC's JMethod
. Used when
bootstrapping a DynamicJAXBContext
from an XML Schema.
Responsibilities:
- Provide
Constructor
information from the underlyingJMethod
.
- See Also:
-
Constructor Summary
ConstructorDescriptionXJCJavaConstructorImpl
(com.sun.codemodel.JMethod constructor, com.sun.codemodel.JCodeModel codeModel, DynamicClassLoader loader, JavaClass owner) Construct a new instance ofXJCJavaConstructorImpl
. -
Method Summary
Modifier and TypeMethodDescriptionint
Returns the Java language modifiers for thisJavaConstructor
, encoded in an integer.getName()
Returns the name of thisJavaConstructor
.Returns theJavaClass
which contains this constructor.Returns the array of parameters for thisJavaConstructor
.boolean
Indicates if thisJavaConstructor
isabstract
.boolean
isFinal()
Indicates if thisJavaConstructor
isfinal
.boolean
Indicates if thisJavaConstructor
isprivate
.boolean
Indicates if thisJavaConstructor
isprotected
.boolean
isPublic()
Indicates if thisJavaConstructor
ispublic
.boolean
isStatic()
Indicates if thisJavaConstructor
isstatic
.boolean
Not supported.void
setOwningClass
(JavaClass owningClass) Set theJavaClass
which contains this constructor.
-
Constructor Details
-
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 Details
-
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:
-
getName
Returns the name of thisJavaConstructor
.- Specified by:
getName
in interfaceJavaConstructor
- Returns:
- the
String
name of thisJavaConstructor
.
-
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
Returns theJavaClass
which contains this constructor.- Specified by:
getOwningClass
in interfaceJavaConstructor
- Returns:
JavaClass
representing the owner of thisJavaConstructor
.
-
setOwningClass
Set theJavaClass
which contains this constructor.- Parameters:
owningClass
- theJavaClass
representing the owner of thisJavaConstructor
.
-