Class dnx.lr.ConstNodeDefinition
All Packages Class Hierarchy This Package Previous Next Index
Class dnx.lr.ConstNodeDefinition
java.lang.Object
|
+----dnx.lr.ConstNodeDefinition
- public class ConstNodeDefinition
- extends Object
This class is like a "read-only" NodeDefinition class.
When you ask a node for its definition, you get one of these
rather than a NodeDefinition. We use it so that individual node
classes can't mess with any node definitions; otherwise random
(network) code could potentially mess up the definitions, which
would mess up everything further until the program was restarted.
We don't do such encapsulation with fields because a mess-up
there is not so horrible.
-
ConstNodeDefinition(NodeDefinition)
-
-
countEmbeddedChildCarryingFields()
- Return the number of embedded child-carrying fields in the
NodeDefinition.
-
countEmbeddedFields()
- Return the number of embedded fields in the NodeDefinition.
-
countEventIns()
- Return the number of EventIns in the NodeDefinition.
-
countEventOuts()
- Return the number of EventOuts in the NodeDefinition.
-
countExposedChildCarryingFields()
- Return the number of exposed child-carrying fields
(i.e.
-
countExposedFields()
- Return the number of exposed fields in the NodeDefinition.
-
countNonEmbeddedChildCarryingFields()
- Return the number of child-carrying fields (i.e.
-
countNonEmbeddedFields()
- Return the number of fields in the NodeDefinition, not
including any embedded fields.
-
countTotalChildCarryingFields()
- Return the total number of child-carrying fields in the
NodeDefinition, including any embedded fields.
-
countTotalFields()
- Return the total number of fields in the NodeDefinition,
including any embedded fields.
-
fieldIndexToFieldInstanceIndex(int)
- Convert field index INDEX (which should be the index of a child-
carrying field) into a field instance index.
-
fieldInstanceIndexToFieldIndex(int)
- Convert field instance index into a field index.
-
getEmbeddedFieldIndex(int)
- Return the field index of the nth embedded field, numbering
from 0.
-
getEventInIndex(String)
- Get the index of a named EventIn from its name.
-
getEventInName(int)
- Get the name of an EventIn from its index.
-
getEventInType(int)
- Returns the type of EventIn from its index.
-
getEventInType(String)
- Returns the type of EventIn from its name.
-
getEventOutIndex(String)
- Get the index of a named EventOut.
-
getEventOutName(int)
- Get the name of an EventOut from its index.
-
getEventOutType(int)
- Returns the type of EventOut from its index.
-
getEventOutType(String)
- Returns the type of EventOut from its name.
-
getFieldDefault(int)
- Return the field default value/type given its index.
-
getFieldDefault(String)
- Return the field default value/type given its name.
-
getFieldIndex(String)
- Look up a field index given its name.
-
getFieldName(int)
- Look up a field name given its index.
-
getInterfaceType(String)
- Return whether a given name refers to a field, exposedField,
eventIn, or eventOut.
-
isFieldExposed(int)
- Return true if a field is exposed, false if it isn't.
ConstNodeDefinition
public ConstNodeDefinition(NodeDefinition blunk)
getInterfaceType
public int getInterfaceType(String name)
- Return whether a given name refers to a field, exposedField,
eventIn, or eventOut. Automatically-declared eventIns and eventOuts
in exposedFields are correctly recognized. The result will be
one of EXPOSED_FIELD, FIELD, EVENT_IN, EVENT_OUT, or UNKNONW.
getFieldName
public String getFieldName(int index)
- Look up a field name given its index.
getFieldIndex
public int getFieldIndex(String name)
- Look up a field index given its name.
getFieldDefault
public final Field getFieldDefault(int index)
- Return the field default value/type given its index.
getFieldDefault
public final Field getFieldDefault(String fieldName)
- Return the field default value/type given its name.
isFieldExposed
public final boolean isFieldExposed(int index)
- Return true if a field is exposed, false if it isn't.
getEventInName
public String getEventInName(int index)
- Get the name of an EventIn from its index. If the index
refers to an invalid EventIn, null is returned.
getEventInIndex
public int getEventInIndex(String name)
- Get the index of a named EventIn from its name. If there is no
EventIn with the specified name, -1 is returned.
getEventInType
public final Class getEventInType(int index)
- Returns the type of EventIn from its index. If the index
refers to an invalid EventIn, null is returned.
getEventInType
public final Class getEventInType(String eventName)
- Returns the type of EventIn from its name. If the name
refers to an invalid EventIn, null is returned.
getEventOutName
public String getEventOutName(int index)
- Get the name of an EventOut from its index. If the index
refers to an invalid EventOut, null is returned.
getEventOutIndex
public int getEventOutIndex(String name)
- Get the index of a named EventOut. If there is no EventOut
with the specified name, -1 is returned.
getEventOutType
public final Class getEventOutType(int index)
- Returns the type of EventOut from its index. If the index
refers to an invalid EventOut, null is returned.
getEventOutType
public final Class getEventOutType(String eventName)
- Returns the type of EventOut from its name. If the name
refers to an invalid EventOut, null is returned.
getEmbeddedFieldIndex
public int getEmbeddedFieldIndex(int n)
- Return the field index of the nth embedded field, numbering
from 0.
fieldIndexToFieldInstanceIndex
public int fieldIndexToFieldInstanceIndex(int index)
- Convert field index INDEX (which should be the index of a child-
carrying field) into a field instance index. Field instance indices
are used to access the equivalent field instances out of a
node instance.
fieldInstanceIndexToFieldIndex
public int fieldInstanceIndexToFieldIndex(int index)
- Convert field instance index into a field index. Field
instance indices are used to access the equivalent field
instances out of a node instance.
countNonEmbeddedFields
public final int countNonEmbeddedFields()
- Return the number of fields in the NodeDefinition, not
including any embedded fields. (Embedded fields are those fields
used internally to hold embedded nodes, such as in an
InlineNode.)
countEmbeddedFields
public final int countEmbeddedFields()
- Return the number of embedded fields in the NodeDefinition.
(Embedded fields are those fields used internally to hold
embedded nodes, such as in an InlineNode.)
countTotalFields
public final int countTotalFields()
- Return the total number of fields in the NodeDefinition,
including any embedded fields. (Embedded fields are those fields
used internally to hold embedded nodes, such as in an
InlineNode.)
countExposedFields
public final int countExposedFields()
- Return the number of exposed fields in the NodeDefinition.
(Embedded fields can never be exposed fields.)
countNonEmbeddedChildCarryingFields
public final int countNonEmbeddedChildCarryingFields()
- Return the number of child-carrying fields (i.e. MFNodes and
SFNodes) in the NodeDefinition, not including any embedded
fields. (Embedded fields are those fields used internally to hold
embedded nodes, such as in an InlineNode.)
countEmbeddedChildCarryingFields
public final int countEmbeddedChildCarryingFields()
- Return the number of embedded child-carrying fields in the
NodeDefinition. (Embedded fields are those fields used internally
to hold embedded nodes, such as in an InlineNode.)
countTotalChildCarryingFields
public final int countTotalChildCarryingFields()
- Return the total number of child-carrying fields in the
NodeDefinition, including any embedded fields. (Embedded fields
are those fields used internally to hold embedded nodes, such as
in an InlineNode.)
countExposedChildCarryingFields
public final int countExposedChildCarryingFields()
- Return the number of exposed child-carrying fields
(i.e. MFNodes and SFNodes) in the NodeDefinition. (Embedded
fields can never be exposed fields.)
countEventIns
public final int countEventIns()
- Return the number of EventIns in the NodeDefinition.
This includes those implicitly declared as part of an exposedField.
countEventOuts
public final int countEventOuts()
- Return the number of EventOuts in the NodeDefinition.
This includes those implicitly declared as part of an exposedField.
All Packages Class Hierarchy This Package Previous Next Index