Top Inners Methods
org.glassfish.pfl.dynamic.codegen.spi

public Interface ModifiableFieldReference

extends FieldInfo

Nested and Inner Type Summary

Modifier and TypeClass and Description
public static enum

Method Summary

Modifier and TypeMethod and Description
public void
complete()

Mark the end of the code generation to replace the field reference.

public FieldInfo
public ModifiableFieldReference.ReferenceType
public Variable
getTargetObject()

Return an expression that can be used to access the target object, if !Modifier.isStatic(field().modifiers()).

public Variable
getValue()

Return an expression that can be used to access the field value.

public MethodInfo
public void
replace()

After this call, the field reference will not be emitted.

Inherited from org.glassfish.pfl.dynamic.codegen.spi.FieldInfo:
type

Method Detail

completeback to summary
public void complete()

Mark the end of the code generation to replace the field reference.

fieldback to summary
public FieldInfo field()
getReferenceTypeback to summary
public ModifiableFieldReference.ReferenceType getReferenceType()
getTargetObjectback to summary
public Variable getTargetObject()

Return an expression that can be used to access the target object, if !Modifier.isStatic(field().modifiers()). This variable refers to the target object available before the set or get of the field. If the field is static, this returns null.

getValueback to summary
public Variable getValue()

Return an expression that can be used to access the field value. If getReferenceType()==GET, this variable must be set to the value returned by the reference. If getReferenceType()==SET, this variable contains the value to be stored by the reference.

methodback to summary
public MethodInfo method()
replaceback to summary
public void replace()

After this call, the field reference will not be emitted. Instead, any sequence of Wrapper calls valid in a method body may be used to generate replacement code for the field reference. As an example, the following code would cause equivalent code to the original reference to be emitted, in the case of a non-static field:

Variable target = mf.getTargetObject() ;
Variable value = mf.getValue() ;
String name = field().name() ;

// For getReferenceType() == GET:
_assign( value, _field( target, name ) ) ;

// For getRerenceType() == SET:
_assign( _field( target, name ), value ) ;

org.glassfish.pfl.dynamic.codegen.spi back to summary

public final Enum ModifiableFieldReference.ReferenceType

extends Enum<ModifiableFieldReference.ReferenceType>
Class Inheritance

Field Summary

Modifier and TypeField and Description
public static final ModifiableFieldReference.ReferenceType
public static final ModifiableFieldReference.ReferenceType

Constructor Summary

AccessConstructor and Description
private

Method Summary

Modifier and TypeMethod and Description
public static ModifiableFieldReference.ReferenceType
public static ModifiableFieldReference.ReferenceType[]
Inherited from java.lang.Enum:
clonecompareTodescribeConstableequalsfinalizegetDeclaringClasshashCodenameordinaltoStringvalueOf

Field Detail

GETback to summary
public static final ModifiableFieldReference.ReferenceType GET
SETback to summary
public static final ModifiableFieldReference.ReferenceType SET

Constructor Detail

ReferenceTypeback to summary
private ReferenceType()

Method Detail

valueOfback to summary
public static ModifiableFieldReference.ReferenceType valueOf(String name)
valuesback to summary
public static ModifiableFieldReference.ReferenceType[] values()