protected class ComplexTypeManager.TypeNode
extends java.lang.Object
Modifier and Type | Method and Description |
---|---|
void |
addDependancy(ComplexTypeManager.TypeNode dependancy)
Records that this node depends on the provided node, and also registers this node on that node as a
dependant.
|
void |
addDependant(ComplexTypeManager.TypeNode dependant)
Adds a type node that depends on this type.
|
protected void |
addSubMembers(ComplexTagDefinition def,
Member mem,
java.util.Set<EntityId> typeHierarchy)
Takes the local definition of the member, builds its full structure, and adds it to the tag definition.
|
protected ComplexTag |
buildFullType(java.util.Set<EntityId> typeHierarchy)
Build the full tag definition.
|
protected void |
checkNecessity()
Checks whether this type node is still needed.
|
java.util.List<ComplexMemberDefinition> |
createInstance(EntityId tagId,
TagPath tagPath,
TagDefinition instanceDef)
Takes an instance definition, and collapses the full type hierarchy into it.
|
protected void |
detach()
Removes this node as a dependant from all of its dependencies.
|
int |
getDependantAndInstanceCount() |
EntityId |
getEntityId() |
ComplexTag |
getFullDefinition() |
protected ComplexTag |
getFullDefinition(java.util.Set<EntityId> typeHierarchy) |
TagPath |
getTypePath() |
void |
invalidate(java.util.Set<EntityId> affectedTypes,
java.util.Set<EntityId> affectedInstances)
This is called when the type or one of its dependencies change.
|
void |
removeDependant(ComplexTypeManager.TypeNode dependant) |
void |
removeInstance(EntityId id) |
void |
setEntityId(EntityId entityId) |
void |
setTagPath(TagPath typePath) |
java.lang.String |
toString() |
void |
updateDefinition(ComplexTagDefinition tagDef,
TagStoreObject<TagConfig> configObject,
java.util.Set<EntityId> affectedTypes,
java.util.Set<EntityId> affectedInstances)
Sets the definition of this node.
|
protected void |
updateDependencies()
Rebuilds the dependencies of this node.
|
public TypeNode()
public TypeNode(TagPath typePath)
public int getDependantAndInstanceCount()
public void setEntityId(EntityId entityId)
public EntityId getEntityId()
public void setTagPath(TagPath typePath)
public TagPath getTypePath()
public void invalidate(java.util.Set<EntityId> affectedTypes, java.util.Set<EntityId> affectedInstances)
affectedTypes
- affectedInstances
- public ComplexTag getFullDefinition()
protected ComplexTag getFullDefinition(java.util.Set<EntityId> typeHierarchy)
protected ComplexTag buildFullType(java.util.Set<EntityId> typeHierarchy)
protected void addSubMembers(ComplexTagDefinition def, Member mem, java.util.Set<EntityId> typeHierarchy)
def
- mem
- public void addDependant(ComplexTypeManager.TypeNode dependant)
dependant
- public void removeDependant(ComplexTypeManager.TypeNode dependant)
public void addDependancy(ComplexTypeManager.TypeNode dependancy)
dependancy
- the node that this type depends on. Can be null, just to simplify the code that calls this
function.protected void detach()
protected void updateDependencies()
protected void checkNecessity()
public void updateDefinition(ComplexTagDefinition tagDef, TagStoreObject<TagConfig> configObject, java.util.Set<EntityId> affectedTypes, java.util.Set<EntityId> affectedInstances)
tagDef
- affectedTypes
- affectedInstances
- public void removeInstance(EntityId id)
public java.util.List<ComplexMemberDefinition> createInstance(EntityId tagId, TagPath tagPath, TagDefinition instanceDef)
instanceDef
- public java.lang.String toString()
toString
in class java.lang.Object