Class FunctionObjectNodeImpl
- java.lang.Object
-
- net.officefloor.compile.impl.structure.FunctionObjectNodeImpl
-
- All Implemented Interfaces:
FunctionObjectNode
,LinkObjectNode
,Node
,AugmentedFunctionObject
,FunctionObject
,SectionDependencyRequireNode
public class FunctionObjectNodeImpl extends java.lang.Object implements FunctionObjectNode
FunctionObjectNode
implementation.- Author:
- Daniel Sagenschneider
-
-
Field Summary
-
Fields inherited from interface net.officefloor.compile.internal.structure.FunctionObjectNode
TYPE
-
-
Constructor Summary
Constructors Constructor Description FunctionObjectNodeImpl(java.lang.String objectName, ManagedFunctionNode functionNode, NodeContext context)
Initiate.
-
Method Summary
All Methods Instance Methods Concrete Methods Modifier and Type Method Description void
flagAsParameter()
Flags thisFunctionObject
as a parameter for theManagedFunction
.Node[]
getChildNodes()
Obtains the childNode
instances.java.lang.String
getFunctionObjectName()
Obtains the name of thisFunctionObject
.LinkObjectNode
getLinkedObjectNode()
Obtains theLinkObjectNode
linked to thisLinkObjectNode
.java.lang.String
getLocation()
Obtains the location of theNode
.java.lang.String
getNodeName()
Obtains the name of theNode
.java.lang.String
getNodeType()
Obtains theNode
type.Node
getParentNode()
void
initialise()
Initialises theFunctionObjectNode
.boolean
isInitialised()
Indicates if theNode
has been initialised.boolean
isLinked()
Indicates if theFunctionObject
is already linked.boolean
isParameter()
Indicates if thisFunctionObject
is a parameter to theManagedFunction
.boolean
linkObjectNode(LinkObjectNode node)
Links the inputLinkObjectNode
to thisLinkObjectNode
.ObjectDependencyType
loadObjectDependencyType(CompileContext compileContext)
Loads theObjectDependencyType
.-
Methods inherited from class java.lang.Object
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait
-
Methods inherited from interface net.officefloor.compile.internal.structure.Node
getQualifiedName, getQualifiedName
-
-
-
-
Constructor Detail
-
FunctionObjectNodeImpl
public FunctionObjectNodeImpl(java.lang.String objectName, ManagedFunctionNode functionNode, NodeContext context)
Initiate.- Parameters:
objectName
- Name of thisFunctionObject
.functionNode
-ManagedFunctionNode
containing thisFunctionObjectNode
.context
-NodeContext
.
-
-
Method Detail
-
getNodeName
public java.lang.String getNodeName()
Description copied from interface:Node
Obtains the name of theNode
.- Specified by:
getNodeName
in interfaceNode
- Returns:
- Name of the
Node
.
-
getNodeType
public java.lang.String getNodeType()
Description copied from interface:Node
Obtains theNode
type.- Specified by:
getNodeType
in interfaceNode
- Returns:
Node
type.
-
getLocation
public java.lang.String getLocation()
Description copied from interface:Node
Obtains the location of theNode
.- Specified by:
getLocation
in interfaceNode
- Returns:
- Location of the
Node
. May benull
ifNode
does not support a location.
-
getParentNode
public Node getParentNode()
Description copied from interface:Node
- Specified by:
getParentNode
in interfaceNode
- Returns:
Node
containing thisNode
.
-
getChildNodes
public Node[] getChildNodes()
Description copied from interface:Node
Obtains the childNode
instances.- Specified by:
getChildNodes
in interfaceNode
- Returns:
- Child
Node
instances.
-
isInitialised
public boolean isInitialised()
Description copied from interface:Node
Indicates if theNode
has been initialised.Node
instances should only be initialised once. Initialising theNode
twice is an issue.- Specified by:
isInitialised
in interfaceNode
- Returns:
true
if initialised.
-
initialise
public void initialise()
Description copied from interface:FunctionObjectNode
Initialises theFunctionObjectNode
.- Specified by:
initialise
in interfaceFunctionObjectNode
-
isParameter
public boolean isParameter()
Description copied from interface:FunctionObjectNode
Indicates if thisFunctionObject
is a parameter to theManagedFunction
.- Specified by:
isParameter
in interfaceFunctionObjectNode
- Returns:
true
if thisFunctionObject
is a parameter to theManagedFunction
.
-
loadObjectDependencyType
public ObjectDependencyType loadObjectDependencyType(CompileContext compileContext)
Description copied from interface:FunctionObjectNode
Loads theObjectDependencyType
.- Specified by:
loadObjectDependencyType
in interfaceFunctionObjectNode
- Parameters:
compileContext
-CompileContext
.- Returns:
ObjectDependencyType
ornull
with issue reported to theCompilerIssues
.
-
getFunctionObjectName
public java.lang.String getFunctionObjectName()
Description copied from interface:AugmentedFunctionObject
Obtains the name of thisFunctionObject
.- Specified by:
getFunctionObjectName
in interfaceAugmentedFunctionObject
- Specified by:
getFunctionObjectName
in interfaceFunctionObject
- Returns:
- Name of this
FunctionObject
.
-
flagAsParameter
public void flagAsParameter()
Description copied from interface:AugmentedFunctionObject
Flags thisFunctionObject
as a parameter for theManagedFunction
.- Specified by:
flagAsParameter
in interfaceAugmentedFunctionObject
- Specified by:
flagAsParameter
in interfaceFunctionObject
-
isLinked
public boolean isLinked()
Description copied from interface:AugmentedFunctionObject
Indicates if theFunctionObject
is already linked.- Specified by:
isLinked
in interfaceAugmentedFunctionObject
- Returns:
true
if already linked.
-
linkObjectNode
public boolean linkObjectNode(LinkObjectNode node)
Description copied from interface:LinkObjectNode
Links the inputLinkObjectNode
to thisLinkObjectNode
.- Specified by:
linkObjectNode
in interfaceLinkObjectNode
- Parameters:
node
-LinkObjectNode
to link to thisLinkObjectNode
.- Returns:
true
if linked.
-
getLinkedObjectNode
public LinkObjectNode getLinkedObjectNode()
Description copied from interface:LinkObjectNode
Obtains theLinkObjectNode
linked to thisLinkObjectNode
.- Specified by:
getLinkedObjectNode
in interfaceLinkObjectNode
- Returns:
LinkObjectNode
linked to thisLinkObjectNode
.
-
-