Top Fields Constructors Methods
org.glassfish.pfl.dynamic.codegen.impl

public Class FieldGenerator

extends FieldInfoImpl
implements Node
Class Inheritance
All Implemented Interfaces
org.glassfish.pfl.dynamic.codegen.impl.Node, org.glassfish.pfl.dynamic.codegen.impl.AttributedObject
Imports
java.lang.reflect.Modifier, java.util.List, org.glassfish.pfl.dynamic.codegen.spi.Expression, .Type

Field Summary

Modifier and TypeField and Description
private Node
Inherited from org.glassfish.pfl.dynamic.codegen.impl.FieldInfoImpl:
type

Constructor Summary

AccessConstructor and Description
public
FieldGenerator(ClassGeneratorImpl cinfo, int modifiers, Type type, String ident)

Method Summary

Modifier and TypeMethod and Description
public void
accept(Visitor visitor)

Implements org.glassfish.pfl.dynamic.codegen.impl.Node.accept.

Accept the visitor and allow it to perform actions on this Node.

public List<Object>
attributes()

Implements org.glassfish.pfl.dynamic.codegen.impl.AttributedObject.attributes.

Internal method for dynamic attribute support.

public <T extends Node> T
copy(Class<T> cls)

Implements org.glassfish.pfl.dynamic.codegen.impl.Node.copy.

Make a deep copy of this node.

public <T extends Node> T
copy(Node newParent, Class<T> cls)

Implements org.glassfish.pfl.dynamic.codegen.impl.Node.copy.

Copy setting a new parent in the result.

public Object
get(int index)

Implements org.glassfish.pfl.dynamic.codegen.impl.AttributedObject.get.

Internal method for dynamic attribute support.

public <T extends Node> T
getAncestor(Class<T> type)

Implements org.glassfish.pfl.dynamic.codegen.impl.Node.getAncestor.

Return the first ancestor of this node of the given type, if any.

public Expression
public int
id()

Implements org.glassfish.pfl.dynamic.codegen.impl.Node.id.

Return the unique ID of this node.

public Node
parent()

Implements org.glassfish.pfl.dynamic.codegen.impl.Node.parent.

Return the Node that contains (and created) this Node.

public void
parent(Node node)

Implements org.glassfish.pfl.dynamic.codegen.impl.Node.parent.

Set the parent to a new value.

public void
set(int index, Object obj)

Implements org.glassfish.pfl.dynamic.codegen.impl.AttributedObject.set.

Internal method for dynamic attribute support.

Inherited from org.glassfish.pfl.dynamic.codegen.impl.FieldInfoImpl:
equalshashCodetoStringtype

Field Detail

nodeImplback to summary
private Node nodeImpl

Constructor Detail

FieldGeneratorback to summary
public FieldGenerator(ClassGeneratorImpl cinfo, int modifiers, Type type, String ident)

Method Detail

acceptback to summary
public void accept(Visitor visitor)

Implements org.glassfish.pfl.dynamic.codegen.impl.Node.accept.

Doc from org.glassfish.pfl.dynamic.codegen.impl.Node.accept.

Accept the visitor and allow it to perform actions on this Node.

attributesback to summary
public List<Object> attributes()

Implements org.glassfish.pfl.dynamic.codegen.impl.AttributedObject.attributes.

Doc from org.glassfish.pfl.dynamic.codegen.impl.AttributedObject.attributes.

Internal method for dynamic attribute support. Return all attributes for this node (may be null).

copyback to summary
public <T extends Node> T copy(Class<T> cls)

Implements org.glassfish.pfl.dynamic.codegen.impl.Node.copy.

Doc from org.glassfish.pfl.dynamic.codegen.impl.Node.copy.

Make a deep copy of this node. If nn = n.copy(), then n.parent() == nn.parent(), which also means that the parent is NOT copied.

copyback to summary
public <T extends Node> T copy(Node newParent, Class<T> cls)

Implements org.glassfish.pfl.dynamic.codegen.impl.Node.copy.

Doc from org.glassfish.pfl.dynamic.codegen.impl.Node.copy.

Copy setting a new parent in the result.

getback to summary
public Object get(int index)

Implements org.glassfish.pfl.dynamic.codegen.impl.AttributedObject.get.

Doc from org.glassfish.pfl.dynamic.codegen.impl.AttributedObject.get.

Internal method for dynamic attribute support. Return the value of the attribute at index. If the attribute at index is not set, set it to the default value and return the default.

getAncestorback to summary
public <T extends Node> T getAncestor(Class<T> type)

Implements org.glassfish.pfl.dynamic.codegen.impl.Node.getAncestor.

Doc from org.glassfish.pfl.dynamic.codegen.impl.Node.getAncestor.

Return the first ancestor of this node of the given type, if any. Throws IllegalArgumentException if not found.

getExpressionback to summary
public Expression getExpression()
idback to summary
public int id()

Implements org.glassfish.pfl.dynamic.codegen.impl.Node.id.

Doc from org.glassfish.pfl.dynamic.codegen.impl.Node.id.

Return the unique ID of this node. This starts at 1 and is incremented for each new Node that is created.

parentback to summary
public Node parent()

Implements org.glassfish.pfl.dynamic.codegen.impl.Node.parent.

Doc from org.glassfish.pfl.dynamic.codegen.impl.Node.parent.

Return the Node that contains (and created) this Node.

parentback to summary
public void parent(Node node)

Implements org.glassfish.pfl.dynamic.codegen.impl.Node.parent.

Doc from org.glassfish.pfl.dynamic.codegen.impl.Node.parent.

Set the parent to a new value. Should only be called inside NodeBase.

setback to summary
public void set(int index, Object obj)

Implements org.glassfish.pfl.dynamic.codegen.impl.AttributedObject.set.

Doc from org.glassfish.pfl.dynamic.codegen.impl.AttributedObject.set.

Internal method for dynamic attribute support. Set the attribute at index to obj.