Class ManagedObjectDependencyNodeImpl
- java.lang.Object
-
- net.officefloor.compile.impl.structure.ManagedObjectDependencyNodeImpl
-
- All Implemented Interfaces:
LinkObjectNode
,ManagedObjectDependencyNode
,Node
,ManagedObjectDependency
,OfficeDependencyRequireNode
,OfficeManagedObjectDependency
,OfficeFloorDependencyRequireNode
,OfficeFloorManagedObjectDependency
,SectionDependencyRequireNode
,SectionManagedObjectDependency
public class ManagedObjectDependencyNodeImpl extends java.lang.Object implements ManagedObjectDependencyNode
ManagedObjectDependencyNode
implementation.- Author:
- Daniel Sagenschneider
-
-
Field Summary
-
Fields inherited from interface net.officefloor.compile.internal.structure.ManagedObjectDependencyNode
TYPE
-
-
Constructor Summary
Constructors Constructor Description ManagedObjectDependencyNodeImpl(java.lang.String dependencyName, ManagedObjectNode managedObject, NodeContext context)
Initiate.ManagedObjectDependencyNodeImpl(java.lang.String dependencyName, ManagedObjectSourceNode managedObjectSource, NodeContext context)
Initiate.
-
Method Summary
All Methods Instance Methods Concrete Methods Modifier and Type Method Description 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
getManagedObjectDependencyName()
Obtains the name of thisManagedObjectDependency
.java.lang.String
getNodeName()
Obtains the name of theNode
.java.lang.String
getNodeType()
Obtains theNode
type.Node
getParentNode()
void
initialise()
Initialises theManagedObjectDependencyNode
.boolean
isInitialised()
Indicates if theNode
has been initialised.boolean
linkObjectNode(LinkObjectNode node)
Links the inputLinkObjectNode
to thisLinkObjectNode
.ObjectDependencyType
loadObjectDependencyType(CompileContext compileContext)
===================== ObjectDependencyNode ==============================void
setOverrideQualifier(java.lang.String qualifier)
Overrides the qualifier specified by theManagedObjectSource
.void
setSpecificType(java.lang.String type)
Specifies a more specific type than the type specified by theManagedObjectSource
.-
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
-
ManagedObjectDependencyNodeImpl
public ManagedObjectDependencyNodeImpl(java.lang.String dependencyName, ManagedObjectNode managedObject, NodeContext context)
Initiate.- Parameters:
dependencyName
- Name of thisManagedObjectDependency
.managedObject
- ParentManagedObjectNode
.context
-NodeContext
.
-
ManagedObjectDependencyNodeImpl
public ManagedObjectDependencyNodeImpl(java.lang.String dependencyName, ManagedObjectSourceNode managedObjectSource, NodeContext context)
Initiate.- Parameters:
dependencyName
- Name of thisManagedObjectDependency
.managedObjectSource
- ParentManagedObjectSourceNode
.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:ManagedObjectDependencyNode
Initialises theManagedObjectDependencyNode
.- Specified by:
initialise
in interfaceManagedObjectDependencyNode
-
getManagedObjectDependencyName
public java.lang.String getManagedObjectDependencyName()
Description copied from interface:ManagedObjectDependency
Obtains the name of thisManagedObjectDependency
.- Specified by:
getManagedObjectDependencyName
in interfaceManagedObjectDependency
- Returns:
- Name of this
ManagedObjectDependency
.
-
setOverrideQualifier
public void setOverrideQualifier(java.lang.String qualifier)
Description copied from interface:ManagedObjectDependency
Overrides the qualifier specified by theManagedObjectSource
.- Specified by:
setOverrideQualifier
in interfaceManagedObjectDependency
- Parameters:
qualifier
- Qualifier to use for theManagedObjectDependency
.
-
setSpecificType
public void setSpecificType(java.lang.String type)
Description copied from interface:ManagedObjectDependency
Specifies a more specific type than the type specified by the
ManagedObjectSource
.Note: the type needs to be child of the actual type, otherwise it would cause
ClassCastException
on attempting to the use the resulting dependency. Hence the type can not be overridden but rather is able to be made more specific (particularly for auto wiring the dependency).- Specified by:
setSpecificType
in interfaceManagedObjectDependency
- Parameters:
type
- Type to use for theManagedObjectDependency
.
-
loadObjectDependencyType
public ObjectDependencyType loadObjectDependencyType(CompileContext compileContext)
===================== ObjectDependencyNode ==============================- Specified by:
loadObjectDependencyType
in interfaceManagedObjectDependencyNode
- Parameters:
compileContext
-CompileContext
.- Returns:
ObjectDependencyType
ornull
with issue reported to theCompilerIssues
.
-
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
.
-
-