Interface X3DProtoDeclaration
- All Known Subinterfaces:
X3DExternProtoDeclaration
- All Known Implementing Classes:
SAIExternProtoDeclaration
,SAIProtoDeclaration
This is the representation of the declaration, not of a runtime node. For this reason you cannot access the internals, nor can you work with the individual field values. You can, however, perform basic introspection tasks such as looking at the available field definitions and seeing the basic node type.
- Version:
- $Revision: 1.2 $
- Author:
- Justin Couch
-
Method Summary
Modifier and TypeMethodDescriptionCreate an instance of this proto that may be used at runtime.void
dispose()
Dispose of this node's resources.Get the list of fields that this node contains.int[]
Fetch the type of this proto.Get the type of this node.
-
Method Details
-
getProtoName
Get the type of this node. The string returned should be the name of the VRML node or the name of the proto instance this node represents.- Returns:
- The type of this node.
- Throws:
InvalidNodeException
- The node has had it's resources disposed of
-
getNodeType
Fetch the type of this proto. The proto's type is defined by the first child node in the body, in accordance with the X3D specification.The types values are provided in the array of values. There is no specific order of the returned types. It is expected that most node types, which only descend from a single parent type would return an array of length 1.
- Returns:
- The primary type(s) of this node
- Throws:
InvalidNodeException
- The node has had it's resources disposed of
-
getFieldDefinitions
Get the list of fields that this node contains. This will return one definition for each field regardless of whether it is eventIn/Out, exposedField or field access type.- Returns:
- The definitions for all fields of this node
- Throws:
InvalidNodeException
- The node has had it's resources disposed of
-
createInstance
Create an instance of this proto that may be used at runtime.- Returns:
- An instance of this proto to work with
- Throws:
InvalidNodeException
- The node has had it's resources disposed of
-
dispose
Dispose of this node's resources. This is used to indicate to the browser that the java side of the application does not require the resources represented by this node. The browser is now free to do what it likes with the node.This in no way implies that the browser is to remove this node from the scene graph, only that the java code is no longer interested in this particular node through this reference.
Once this method has been called, any further calls to methods of this instance of the class is shall generate an InvalidNodeException.
- Throws:
InvalidNodeException
- The node is no longer valid and can't be disposed of again.
-