|
||||||||||
PREV CLASS NEXT CLASS | FRAMES NO FRAMES All Classes | |||||||||
SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD |
java.lang.Objectde.jstacs.AnnotatedEntity
public abstract class AnnotatedEntity
Superclass for all Jstacs entities that have a name, a comment, and a data type as annotations.
Specifically, such entities are Result
s for storing results of some computation together with an annotation on their
meaning, and Parameter
s, which allow for annotating external parameters, especially parameters of constructors.
Field Summary | |
---|---|
protected String |
comment
The comment for the entity. |
protected DataType |
datatype
The data type of the entity. |
protected String |
name
The name of the entity. |
Constructor Summary | |
---|---|
protected |
AnnotatedEntity(StringBuffer rep)
The standard constructor for the interface Storable . |
protected |
AnnotatedEntity(String name,
String comment,
DataType datatype)
The main constructor which takes the main information of a AnnotatedEntity . |
Method Summary | |
---|---|
protected abstract void |
appendFurtherInfos(StringBuffer buf)
This method can be used in the method Storable.toXML() to extract
further information (name, comment, datatype). |
protected abstract void |
extractFurtherInfos(StringBuffer buf)
This method can be used in the constructor with parameter StringBuffer to
extract the further information. |
String |
getComment()
Returns the comment on the AnnotatedEntity . |
DataType |
getDatatype()
Returns the data type of the AnnotatedEntity . |
String |
getName()
Returns the name of the AnnotatedEntity . |
abstract Object |
getValue()
Returns the value of the AnnotatedEntity . |
abstract String |
getXMLTag()
This method returns a tag used as outer tag of the XML description. |
StringBuffer |
toXML()
This method returns an XML representation as StringBuffer of an
instance of the implementing class. |
Methods inherited from class java.lang.Object |
---|
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait |
Field Detail |
---|
protected String name
protected String comment
protected DataType datatype
Constructor Detail |
---|
protected AnnotatedEntity(String name, String comment, DataType datatype)
AnnotatedEntity
.
name
- the name of the resultcomment
- the comment for the resultdatatype
- the data type of the resultprotected AnnotatedEntity(StringBuffer rep) throws NonParsableException
Storable
. Creates a
new AnnotatedEntity
out of its XML representation.
rep
- the XML representation as StringBuffer
NonParsableException
- if the XML representation is not parsableStorable
,
extractFurtherInfos(StringBuffer)
Method Detail |
---|
public abstract String getXMLTag()
public final StringBuffer toXML()
Storable
StringBuffer
of an
instance of the implementing class.
toXML
in interface Storable
protected abstract void appendFurtherInfos(StringBuffer buf)
Storable.toXML()
to extract
further information (name, comment, datatype).
buf
- a XML representation of the main information as
StringBuffer
Storable.toXML()
protected abstract void extractFurtherInfos(StringBuffer buf) throws NonParsableException
StringBuffer
to
extract the further information.
buf
- a XML represenation of the main information as
StringBuffer
NonParsableException
- if the XML representation is not parsableAnnotatedEntity(StringBuffer)
public final DataType getDatatype()
AnnotatedEntity
.
AnnotatedEntity
public abstract Object getValue()
AnnotatedEntity
.
AnnotatedEntity
public final String getName()
AnnotatedEntity
.
AnnotatedEntity
public final String getComment()
AnnotatedEntity
.
AnnotatedEntity
|
||||||||||
PREV CLASS NEXT CLASS | FRAMES NO FRAMES All Classes | |||||||||
SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD |