com.sun.tools.xjc.api.impl.s2j
Class ElementSingleAdapter.FieldAccessorImpl
java.lang.Object
com.sun.tools.xjc.api.impl.s2j.ElementAdapter.FieldAccessorImpl
com.sun.tools.xjc.api.impl.s2j.ElementSingleAdapter.FieldAccessorImpl
- All Implemented Interfaces:
- FieldAccessor
- Enclosing class:
- ElementSingleAdapter
final class ElementSingleAdapter.FieldAccessorImpl
- extends ElementAdapter.FieldAccessorImpl
Method Summary |
void |
fromRawValue(com.sun.codemodel.JBlock block,
String uniqueName,
com.sun.codemodel.JExpression $var)
Sets the value of the field from the specified expression. |
void |
toRawValue(com.sun.codemodel.JBlock block,
com.sun.codemodel.JVar $var)
Dumps everything in this field into the given variable. |
Methods inherited from class java.lang.Object |
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait |
ElementSingleAdapter.FieldAccessorImpl
public ElementSingleAdapter.FieldAccessorImpl(com.sun.codemodel.JExpression target)
toRawValue
public void toRawValue(com.sun.codemodel.JBlock block,
com.sun.codemodel.JVar $var)
- Description copied from interface:
FieldAccessor
- Dumps everything in this field into the given variable.
This generates code that accesses the field from outside.
- Parameters:
block
- The code will be generated into this block.$var
- Variable whose type is FieldOutline.getRawType()
fromRawValue
public void fromRawValue(com.sun.codemodel.JBlock block,
String uniqueName,
com.sun.codemodel.JExpression $var)
- Description copied from interface:
FieldAccessor
- Sets the value of the field from the specified expression.
This generates code that accesses the field from outside.
- Parameters:
block
- The code will be generated into this block.uniqueName
- Identifier that the caller guarantees to be unique in
the given block. When the callee needs to produce additional
variables, it can do so by adding suffixes to this unique
name. For example, if the uniqueName is "abc", then the
caller guarantees that any identifier "abc.*" is unused
in this block.$var
- The expression that evaluates to a value of the type
FieldOutline.getRawType()
.