@Immutable public class TargetNodeImpl extends AbstractGroupNode implements TargetNode
TargetNode
implementationANNOTATION_RESULT, ANNOTATION_RESULT_DEFINED
ANNOTATION_CHILDREN
Constructor and Description |
---|
TargetNodeImpl(EntityDefinition entity,
Collection<CellNode> cells,
TypeDefinition parentType,
int depth,
GroupNode parent)
Create a target node that is populated with assignments and children
according to the given parameters.
|
TargetNodeImpl(EntityDefinition entity,
GroupNode parent)
Create a target node associated with the given entity definition but
unpopulated.
|
Modifier and Type | Method and Description |
---|---|
void |
accept(TransformationNodeVisitor visitor)
Accept a transformation node visitor.
|
void |
addAssignment(Set<String> names,
CellNode cell)
Add an assignment to the target node.
|
void |
addChild(TargetNode node)
Add a child to the target node.
|
boolean |
equals(Object obj) |
Set<String> |
getAssignmentNames(CellNode assignment)
Get the assignment names for the given cell.
|
Set<CellNode> |
getAssignments()
Get the assignment to this property
|
ChildDefinition<?> |
getDefinition()
Get the associated definition
|
EntityDefinition |
getEntityDefinition()
Get the full entity definition associated with the node.
|
List<TargetNode> |
getFixedChildren()
Get the fixed target node children, i.e.
|
Object |
getResult()
Get the result value of the node as assigned through a property
transformation.
|
int |
hashCode() |
boolean |
isDefined()
Get if the node result is defined.
|
void |
setDefined(boolean defined)
Set the value of the result defined annotation.
|
void |
setResult(Object value)
Set the value of the result annotation.
|
addAnnotatedChild, getChildren, getParent
getAnnotation, hasAnnotations, reset, setAnnotation
clone, finalize, getClass, notify, notifyAll, toString, wait, wait, wait
addAnnotatedChild, getChildren, getParent
getAnnotation, hasAnnotations, reset, setAnnotation
public TargetNodeImpl(EntityDefinition entity, Collection<CellNode> cells, TypeDefinition parentType, int depth, GroupNode parent)
entity
- the associated definitioncells
- the cells associated with this node or its childrenparentType
- the type representing the rootdepth
- the depth down from the root nodeparent
- the parent nodepublic TargetNodeImpl(EntityDefinition entity, GroupNode parent)
entity
- the entity definitionparent
- the parent nodepublic void addAssignment(Set<String> names, CellNode cell)
TargetNodeImpl(EntityDefinition, GroupNode)
constructor.names
- the entity names associated to the assignmentcell
- the cell node representing the assignmentpublic void addChild(TargetNode node)
TargetNodeImpl(EntityDefinition, GroupNode)
constructor.node
- the node to add as child, this node will be set as its parentpublic void accept(TransformationNodeVisitor visitor)
TransformationNode
accept
in interface TransformationNode
visitor
- the visitorTransformationNode.accept(TransformationNodeVisitor)
public List<TargetNode> getFixedChildren()
AbstractGroupNode
getFixedChildren
in class AbstractGroupNode
AbstractGroupNode.getFixedChildren()
public Set<CellNode> getAssignments()
TargetNode
getAssignments
in interface TargetNode
TargetNode.getAssignments()
public Set<String> getAssignmentNames(CellNode assignment)
TargetNode
getAssignmentNames
in interface TargetNode
assignment
- the assigned cellTargetNode.getAssignmentNames(CellNode)
public ChildDefinition<?> getDefinition()
TargetNode
getDefinition
in interface TargetNode
TargetNode.getDefinition()
public EntityDefinition getEntityDefinition()
TargetNode
getEntityDefinition
in interface TargetNode
TargetNode.getEntityDefinition()
public boolean isDefined()
TargetNode
isDefined
in interface TargetNode
false
if it is not setTargetNode.isDefined()
public void setDefined(boolean defined)
TargetNode
setDefined
in interface TargetNode
defined
- if the node result is definedTargetNode.setDefined(boolean)
public Object getResult()
TargetNode
getResult
in interface TargetNode
null
TargetNode.getResult()
public void setResult(Object value)
TargetNode
true
.setResult
in interface TargetNode
value
- the result value of the nodeTargetNode.setResult(Object)
public int hashCode()
hashCode
in class Object
Object.hashCode()
public boolean equals(Object obj)
equals
in class Object
Object.equals(java.lang.Object)
Build 2013-10-07_11-27-38
Revision 99b27713a799a59a21b0b166eaaea8aaefbf125a