public abstract class SimpleDataNodeBuilder extends DataNodeBuilder
| Modifier | Constructor and Description |
|---|---|
protected |
SimpleDataNodeBuilder(Class nodeClass,
Class argClass)
Construct a new builder which will turn out DataNode of a given
class from objects of a given class.
|
protected |
SimpleDataNodeBuilder(String name,
Class argClass)
Construct a new builder which will turn out DataNodes from
objects of a given class (or its subclasses).
|
| Modifier and Type | Method and Description |
|---|---|
abstract DataNode |
buildNode(Object obj)
Builds a DataNode from a given object.
|
Class |
getNodeClass()
Returns the class which all nodes returned by the
DataNodeBuilder.buildNode(java.lang.Object)
method will belong to. |
boolean |
suitable(Class objClass)
Determine whether this builder can be used to work on an object
of a given class.
|
String |
toString() |
getBuildersprotected SimpleDataNodeBuilder(String name, Class argClass)
name - the name of this builder - this should normally be
the classname of the DataNodes it will produceargClass - the class on which this node builder will operateprotected SimpleDataNodeBuilder(Class nodeClass, Class argClass)
SimpleDataNodeBuilder(nodeClass.getName(),argClass).nodeClass - the class of DataNode objects which this builder
will be buildingargClass - the class on which this node bulider will operatepublic abstract DataNode buildNode(Object obj) throws NoSuchDataException
DataNodeBuilderbuildNode in class DataNodeBuilderobj - the object to build a datanode fromobjNoSuchDataException - if no new node can be createdpublic Class getNodeClass()
DataNodeBuilderDataNodeBuilder.buildNode(java.lang.Object)
method will belong to. DataNodeBuilder's implementation of this
returns DataNode.class, but implementations which can
be more specific should override this method.getNodeClass in class DataNodeBuilderpublic boolean suitable(Class objClass)
DataNodeBuildersuitable in class DataNodeBuilderobjClass - the class of an object which might be passed
as the argument of buildNodeCopyright © 2025 Central Laboratory of the Research Councils. All Rights Reserved.