|
|||||||||
PREV CLASS NEXT CLASS | FRAMES NO FRAMES | ||||||||
SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD |
java.lang.Objectuk.ac.starlink.datanode.factory.DataNodeBuilder
uk.ac.starlink.datanode.factory.SourceDataNodeBuilder
public class SourceDataNodeBuilder
A DataNodebuilder which tries to build a DataNode from a DataSource object. It examines the file and may invoke a constructor of a DataNode subclass if it knows of one which is likely to be suitable. It will only try constructors which might have a chance.
Part of its duties involve constructing a DOM from a DataSource which looks like XML and offering it to known XML consumers.
Method Summary | |
---|---|
DataNode |
buildNode(Object obj)
Builds a DataNode from a given object. |
static SourceDataNodeBuilder |
getInstance()
Obtains the singleton instance of this class. |
boolean |
suitable(Class objClass)
Determine whether this builder can be used to work on an object of a given class. |
String |
toString()
|
Methods inherited from class uk.ac.starlink.datanode.factory.DataNodeBuilder |
---|
getBuilders, getNodeClass |
Methods inherited from class java.lang.Object |
---|
clone, equals, finalize, getClass, hashCode, notify, notifyAll, wait, wait, wait |
Method Detail |
---|
public static SourceDataNodeBuilder getInstance()
public boolean suitable(Class objClass)
DataNodeBuilder
suitable
in class DataNodeBuilder
objClass
- the class of an object which might be passed
as the argument of buildNode
public DataNode buildNode(Object obj) throws NoSuchDataException
DataNodeBuilder
buildNode
in class DataNodeBuilder
obj
- the object to build a datanode from
NoSuchDataException
- if no new node can be createdpublic String toString()
toString
in class Object
|
|||||||||
PREV CLASS NEXT CLASS | FRAMES NO FRAMES | ||||||||
SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD |