|
||||||||||
PREV CLASS NEXT CLASS | FRAMES NO FRAMES | |||||||||
SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD |
java.lang.Objectcom.sun.tools.xjc.api.impl.s2j.PropertyImpl
public final class PropertyImpl
Field Summary | |
---|---|
protected com.sun.codemodel.JCodeModel |
codeModel
|
protected javax.xml.namespace.QName |
elementName
|
protected FieldOutline |
fr
|
protected Mapping |
parent
|
Constructor Summary | |
---|---|
PropertyImpl(Mapping parent,
FieldOutline fr,
javax.xml.namespace.QName elementName)
|
Method Summary | |
---|---|
protected FieldAccessor |
createAccessor(java.lang.String bean)
|
javax.xml.namespace.QName |
elementName()
Name of the XML element that corresponds to the property. |
java.lang.String |
getValue(java.lang.String bean,
java.lang.String var,
java.lang.String uniqueName)
Generates the code that gets values to this property. |
java.lang.String |
name()
The name of the property. |
java.lang.String |
setValue(java.lang.String bean,
java.lang.String var,
java.lang.String uniqueName)
Generates the code that sets values to this property. |
com.sun.codemodel.JType |
type()
The Java type of the property. |
protected java.lang.String |
writeBlock(com.sun.codemodel.JBlock block)
|
Methods inherited from class java.lang.Object |
---|
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait |
Field Detail |
---|
protected final FieldOutline fr
protected final javax.xml.namespace.QName elementName
protected final Mapping parent
protected final com.sun.codemodel.JCodeModel codeModel
Constructor Detail |
---|
PropertyImpl(Mapping parent, FieldOutline fr, javax.xml.namespace.QName elementName)
Method Detail |
---|
public final java.lang.String name()
Property
This method returns a valid identifier suitable for the use as a variable name.
name
in interface Property
public final javax.xml.namespace.QName elementName()
Property
Each child of a wrapper style element corresponds with an element, and this method returns that name.
elementName
in interface Property
QName
.protected final FieldAccessor createAccessor(java.lang.String bean)
protected final java.lang.String writeBlock(com.sun.codemodel.JBlock block)
public final com.sun.codemodel.JType type()
Property
type
in interface Property
JType
is a representation of a Java type in a codeModel.
If you just need the fully-qualified class name, call JType.fullName()
.public java.lang.String setValue(java.lang.String bean, java.lang.String var, java.lang.String uniqueName)
Property
setValue
in interface Property
bean
- A variable name that evaluates to the
"type representation" of the bean that receives
new values.var
- A variable name that evaluates to the values to be set.
The type of this variable must be the one returned by
Property.type()
uniqueName
- Sometimes this method needs to generate additional local
variables to get the job done. This parameter specifies
what names can be used in such occasion.
This parameter must not be null.
For example, when you pass "abc", you are guaranteeing that
any identifier "abc.*" (in regexp) is usable unused
identifier names in the context where this code is used.
public java.lang.String getValue(java.lang.String bean, java.lang.String var, java.lang.String uniqueName)
Property
getValue
in interface Property
bean
- A variable name that evaluates to the
"type representation" of the bean whose values
will be retrieved.var
- A variable name that evaluates to the values to be set.
The type of this variable must be the one returned by
Property.type()
.uniqueName
- Sometimes this method needs to generate additional local
variables to get the job done. This parameter specifies
what names can be used in such occasion.
This parameter must not be null.
For example, when you pass "abc", you are guaranteeing that
any identifier "abc.*" (in regexp) is usable unused
identifier names in the context where this code is used.
|
||||||||||
PREV CLASS NEXT CLASS | FRAMES NO FRAMES | |||||||||
SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD |