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
SupplierThreadLocalNode
implementation.- 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 void
buildSupplierThreadLocal(CompileContext context)
Builds theSupplierThreadLocal
.Node[]
getChildNodes()
Obtains the childNode
instances.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.java.lang.String
getOfficeFloorSupplierThreadLocalName()
Obtains the name of thisOfficeFloorSupplierThreadLocal
.java.lang.String
getOfficeSupplierThreadLocalName()
Obtains the name of thisOfficeSupplierThreadLocal
.Node
getParentNode()
java.lang.String
getQualifier()
Obtains the qualifier.SupplierNode
getSupplierNode()
Obtains theSupplierNode
containing thisSupplierThreadLocalNode
.static java.lang.String
getSupplierThreadLocalName(java.lang.String qualifier, java.lang.String type)
Generates the name for theSupplierThreadLocalNode
.java.lang.String
getType()
Obtains the required type.void
initialise(OptionalThreadLocalReceiver optionalThreadLocalReceiver)
Initialises theSupplierThreadLocalNode
.boolean
isInitialised()
Indicates if theNode
has been initialised.boolean
linkObjectNode(LinkObjectNode node)
Links the inputLinkObjectNode
to 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:
SupplierThreadLocalNode
name.
-
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(OptionalThreadLocalReceiver optionalThreadLocalReceiver)
Description copied from interface:SupplierThreadLocalNode
Initialises theSupplierThreadLocalNode
.- Specified by:
initialise
in interfaceSupplierThreadLocalNode
- Parameters:
optionalThreadLocalReceiver
-OptionalThreadLocalReceiver
.
-
getOfficeFloorSupplierThreadLocalName
public java.lang.String getOfficeFloorSupplierThreadLocalName()
Description copied from interface:OfficeFloorSupplierThreadLocal
Obtains the name of thisOfficeFloorSupplierThreadLocal
.- Specified by:
getOfficeFloorSupplierThreadLocalName
in interfaceOfficeFloorSupplierThreadLocal
- Returns:
- Name of this
OfficeFloorSupplierThreadLocal
.
-
getQualifier
public java.lang.String getQualifier()
Description copied from interface:OfficeFloorSupplierThreadLocal
Obtains the qualifier.- Specified by:
getQualifier
in interfaceOfficeFloorSupplierThreadLocal
- Specified by:
getQualifier
in interfaceOfficeSupplierThreadLocal
- Returns:
- Qualifier. May be
null
.
-
getType
public java.lang.String getType()
Description copied from interface:OfficeFloorSupplierThreadLocal
Obtains the required type.- Specified by:
getType
in interfaceOfficeFloorSupplierThreadLocal
- Specified by:
getType
in interfaceOfficeSupplierThreadLocal
- Returns:
- Required type.
-
getOfficeSupplierThreadLocalName
public java.lang.String getOfficeSupplierThreadLocalName()
Description copied from interface:OfficeSupplierThreadLocal
Obtains the name of thisOfficeSupplierThreadLocal
.- Specified by:
getOfficeSupplierThreadLocalName
in interfaceOfficeSupplierThreadLocal
- Returns:
- Name of this
OfficeSupplierThreadLocal
.
-
getSupplierNode
public SupplierNode getSupplierNode()
Description copied from interface:SupplierThreadLocalNode
Obtains theSupplierNode
containing thisSupplierThreadLocalNode
.- Specified by:
getSupplierNode
in interfaceSupplierThreadLocalNode
- Returns:
- Parent
SupplierNode
.
-
buildSupplierThreadLocal
public void buildSupplierThreadLocal(CompileContext context)
Description copied from interface:SupplierThreadLocalNode
Builds theSupplierThreadLocal
.- Specified by:
buildSupplierThreadLocal
in interfaceSupplierThreadLocalNode
- Parameters:
context
-CompileContext
.
-
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
.
-
-