public class XJCJavaConstructorImpl extends java.lang.Object implements JavaConstructor
Purpose: JavaConstructor
implementation wrapping XJC's JMethod
. Used when
bootstrapping a DynamicJAXBContext
from an XML Schema.
Responsibilities:
Constructor
information from the underlying JMethod
.JavaConstructor
Constructor and Description |
---|
XJCJavaConstructorImpl(JMethod constructor,
JCodeModel codeModel,
DynamicClassLoader loader,
JavaClass owner)
Construct a new instance of
XJCJavaConstructorImpl . |
Modifier and Type | Method and Description |
---|---|
int |
getModifiers()
Returns the Java language modifiers for this
JavaConstructor , encoded in an integer. |
java.lang.String |
getName()
Returns the name of this
JavaConstructor . |
JavaClass |
getOwningClass()
Returns the
JavaClass which contains this constructor. |
JavaClass[] |
getParameterTypes()
Returns the array of parameters for this
JavaConstructor . |
boolean |
isAbstract()
Indicates if this
JavaConstructor is abstract . |
boolean |
isFinal()
Indicates if this
JavaConstructor is final . |
boolean |
isPrivate()
Indicates if this
JavaConstructor is private . |
boolean |
isProtected()
Indicates if this
JavaConstructor is protected . |
boolean |
isPublic()
Indicates if this
JavaConstructor is public . |
boolean |
isStatic()
Indicates if this
JavaConstructor is static . |
boolean |
isSynthetic()
Not supported.
|
void |
setOwningClass(JavaClass owningClass)
Set the
JavaClass which contains this constructor. |
public XJCJavaConstructorImpl(JMethod constructor, JCodeModel codeModel, DynamicClassLoader loader, JavaClass owner)
XJCJavaConstructorImpl
.constructor
- - the XJC JMethod
to be wrapped.codeModel
- - the XJC JCodeModel
this constructor belongs to.loader
- - the ClassLoader
used to bootstrap the DynamicJAXBContext
.owner
- - the JavaClass
this constructor belongs to.public int getModifiers()
JavaConstructor
, encoded in an integer.getModifiers
in interface JavaConstructor
int
representing the modifiers for this constructor.Modifier
public java.lang.String getName()
JavaConstructor
.getName
in interface JavaConstructor
String
name of this JavaConstructor
.public JavaClass[] getParameterTypes()
JavaConstructor
.getParameterTypes
in interface JavaConstructor
JavaClass[]
representing the argument types for this constructor.public boolean isAbstract()
JavaConstructor
is abstract
.isAbstract
in interface JavaConstructor
true
if this JavaConstructor
is abstract
, otherwise false
.public boolean isPrivate()
JavaConstructor
is private
.isPrivate
in interface JavaConstructor
true
if this JavaConstructor
is private
, otherwise false
.public boolean isProtected()
JavaConstructor
is protected
.isProtected
in interface JavaConstructor
true
if this JavaConstructor
is protected
, otherwise false
.public boolean isPublic()
JavaConstructor
is public
.isPublic
in interface JavaConstructor
true
if this JavaConstructor
is public
, otherwise false
.public boolean isStatic()
JavaConstructor
is static
.isStatic
in interface JavaConstructor
true
if this JavaConstructor
is static
, otherwise false
.public boolean isFinal()
JavaConstructor
is final
.isFinal
in interface JavaConstructor
true
if this JavaConstructor
is final
, otherwise false
.public boolean isSynthetic()
isSynthetic
in interface JavaConstructor
public JavaClass getOwningClass()
JavaClass
which contains this constructor.getOwningClass
in interface JavaConstructor
JavaClass
representing the owner of this JavaConstructor
.public void setOwningClass(JavaClass owningClass)
JavaClass
which contains this constructor.owningClass
- the JavaClass
representing the owner of this JavaConstructor
.