Class SupplierThreadLocalNodeImpl
- java.lang.Object
-
- net.officefloor.compile.impl.structure.SupplierThreadLocalNodeImpl
-
- All Implemented Interfaces:
LinkObjectNode,Node,SupplierThreadLocalNode,OfficeDependencyRequireNode,OfficeSupplierThreadLocal,OfficeFloorDependencyRequireNode,OfficeFloorSupplierThreadLocal
public class SupplierThreadLocalNodeImpl extends java.lang.Object implements SupplierThreadLocalNode
SupplierThreadLocalNodeimplementation.- Author:
- Daniel Sagenschneider
-
-
Field Summary
-
Fields inherited from interface net.officefloor.compile.internal.structure.SupplierThreadLocalNode
TYPE
-
-
Constructor Summary
Constructors Constructor Description SupplierThreadLocalNodeImpl(java.lang.String qualifier, java.lang.String type, SupplierNode supplierNode, NodeContext context)Initiate.
-
Method Summary
All Methods Static Methods Instance Methods Concrete Methods Modifier and Type Method Description voidbuildSupplierThreadLocal(CompileContext context)Builds theSupplierThreadLocal.Node[]getChildNodes()Obtains the childNodeinstances.LinkObjectNodegetLinkedObjectNode()Obtains theLinkObjectNodelinked to thisLinkObjectNode.java.lang.StringgetLocation()Obtains the location of theNode.java.lang.StringgetNodeName()Obtains the name of theNode.java.lang.StringgetNodeType()Obtains theNodetype.java.lang.StringgetOfficeFloorSupplierThreadLocalName()Obtains the name of thisOfficeFloorSupplierThreadLocal.java.lang.StringgetOfficeSupplierThreadLocalName()Obtains the name of thisOfficeSupplierThreadLocal.NodegetParentNode()java.lang.StringgetQualifier()Obtains the qualifier.SupplierNodegetSupplierNode()Obtains theSupplierNodecontaining thisSupplierThreadLocalNode.static java.lang.StringgetSupplierThreadLocalName(java.lang.String qualifier, java.lang.String type)Generates the name for theSupplierThreadLocalNode.java.lang.StringgetType()Obtains the required type.voidinitialise(OptionalThreadLocalReceiver optionalThreadLocalReceiver)Initialises theSupplierThreadLocalNode.booleanisInitialised()Indicates if theNodehas been initialised.booleanlinkObjectNode(LinkObjectNode node)Links the inputLinkObjectNodeto thisLinkObjectNode.-
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
-
SupplierThreadLocalNodeImpl
public SupplierThreadLocalNodeImpl(java.lang.String qualifier, java.lang.String type, SupplierNode supplierNode, NodeContext context)Initiate.- Parameters:
qualifier- Qualifier. May benull.type- Type.supplierNode-SupplierNode.context-NodeContext.
-
-
Method Detail
-
getSupplierThreadLocalName
public static java.lang.String getSupplierThreadLocalName(java.lang.String qualifier, java.lang.String type)Generates the name for theSupplierThreadLocalNode.- Parameters:
qualifier- Qualifier. May benull.type- Type.- Returns:
SupplierThreadLocalNodename.
-
getNodeName
public java.lang.String getNodeName()
Description copied from interface:NodeObtains the name of theNode.- Specified by:
getNodeNamein interfaceNode- Returns:
- Name of the
Node.
-
getNodeType
public java.lang.String getNodeType()
Description copied from interface:NodeObtains theNodetype.- Specified by:
getNodeTypein interfaceNode- Returns:
Nodetype.
-
getLocation
public java.lang.String getLocation()
Description copied from interface:NodeObtains the location of theNode.- Specified by:
getLocationin interfaceNode- Returns:
- Location of the
Node. May benullifNodedoes not support a location.
-
getParentNode
public Node getParentNode()
Description copied from interface:Node- Specified by:
getParentNodein interfaceNode- Returns:
Nodecontaining thisNode.
-
getChildNodes
public Node[] getChildNodes()
Description copied from interface:NodeObtains the childNodeinstances.- Specified by:
getChildNodesin interfaceNode- Returns:
- Child
Nodeinstances.
-
isInitialised
public boolean isInitialised()
Description copied from interface:NodeIndicates if theNodehas been initialised.Nodeinstances should only be initialised once. Initialising theNodetwice is an issue.- Specified by:
isInitialisedin interfaceNode- Returns:
trueif initialised.
-
initialise
public void initialise(OptionalThreadLocalReceiver optionalThreadLocalReceiver)
Description copied from interface:SupplierThreadLocalNodeInitialises theSupplierThreadLocalNode.- Specified by:
initialisein interfaceSupplierThreadLocalNode- Parameters:
optionalThreadLocalReceiver-OptionalThreadLocalReceiver.
-
getOfficeFloorSupplierThreadLocalName
public java.lang.String getOfficeFloorSupplierThreadLocalName()
Description copied from interface:OfficeFloorSupplierThreadLocalObtains the name of thisOfficeFloorSupplierThreadLocal.- Specified by:
getOfficeFloorSupplierThreadLocalNamein interfaceOfficeFloorSupplierThreadLocal- Returns:
- Name of this
OfficeFloorSupplierThreadLocal.
-
getQualifier
public java.lang.String getQualifier()
Description copied from interface:OfficeFloorSupplierThreadLocalObtains the qualifier.- Specified by:
getQualifierin interfaceOfficeFloorSupplierThreadLocal- Specified by:
getQualifierin interfaceOfficeSupplierThreadLocal- Returns:
- Qualifier. May be
null.
-
getType
public java.lang.String getType()
Description copied from interface:OfficeFloorSupplierThreadLocalObtains the required type.- Specified by:
getTypein interfaceOfficeFloorSupplierThreadLocal- Specified by:
getTypein interfaceOfficeSupplierThreadLocal- Returns:
- Required type.
-
getOfficeSupplierThreadLocalName
public java.lang.String getOfficeSupplierThreadLocalName()
Description copied from interface:OfficeSupplierThreadLocalObtains the name of thisOfficeSupplierThreadLocal.- Specified by:
getOfficeSupplierThreadLocalNamein interfaceOfficeSupplierThreadLocal- Returns:
- Name of this
OfficeSupplierThreadLocal.
-
getSupplierNode
public SupplierNode getSupplierNode()
Description copied from interface:SupplierThreadLocalNodeObtains theSupplierNodecontaining thisSupplierThreadLocalNode.- Specified by:
getSupplierNodein interfaceSupplierThreadLocalNode- Returns:
- Parent
SupplierNode.
-
buildSupplierThreadLocal
public void buildSupplierThreadLocal(CompileContext context)
Description copied from interface:SupplierThreadLocalNodeBuilds theSupplierThreadLocal.- Specified by:
buildSupplierThreadLocalin interfaceSupplierThreadLocalNode- Parameters:
context-CompileContext.
-
linkObjectNode
public boolean linkObjectNode(LinkObjectNode node)
Description copied from interface:LinkObjectNodeLinks the inputLinkObjectNodeto thisLinkObjectNode.- Specified by:
linkObjectNodein interfaceLinkObjectNode- Parameters:
node-LinkObjectNodeto link to thisLinkObjectNode.- Returns:
trueif linked.
-
getLinkedObjectNode
public LinkObjectNode getLinkedObjectNode()
Description copied from interface:LinkObjectNodeObtains theLinkObjectNodelinked to thisLinkObjectNode.- Specified by:
getLinkedObjectNodein interfaceLinkObjectNode- Returns:
LinkObjectNodelinked to thisLinkObjectNode.
-
-