org.drools.lang.descr
Class TypeDeclarationDescr

java.lang.Object
  extended by org.drools.lang.descr.BaseDescr
      extended by org.drools.lang.descr.AnnotatedBaseDescr
          extended by org.drools.lang.descr.TypeDeclarationDescr
All Implemented Interfaces:
Externalizable, Serializable, Comparable<TypeDeclarationDescr>, Namespaceable

public class TypeDeclarationDescr
extends AnnotatedBaseDescr
implements Namespaceable, Comparable<TypeDeclarationDescr>

See Also:
Serialized Form

Nested Class Summary
static class TypeDeclarationDescr.QualifiedName
           
 
Constructor Summary
TypeDeclarationDescr()
           
TypeDeclarationDescr(String typeName)
           
TypeDeclarationDescr(String typeName, String typeNamespace)
           
 
Method Summary
 void addField(TypeFieldDescr field)
           
 void addSuperType(String type)
           
 void addSuperType(TypeDeclarationDescr.QualifiedName type)
           
 int compareTo(TypeDeclarationDescr descr)
           
 boolean equals(Object o)
           
 Map<String,TypeFieldDescr> getFields()
           
 String getNamespace()
           
 String getSupertTypeFullName()
           
 String getSuperTypeName()
           
 String getSuperTypeNamespace()
           
 List<TypeDeclarationDescr.QualifiedName> getSuperTypes()
           
 TypeDeclarationDescr.QualifiedName getType()
           
 String getTypeName()
           
 int hashCode()
           
 void readExternal(ObjectInput in)
           
 void setFields(Map<String,TypeFieldDescr> fields)
           
 void setNamespace(String namespace)
           
 void setType(String name, String namespace)
           
 void setType(TypeDeclarationDescr.QualifiedName qname)
           
 void setTypeName(String typeName)
           
 String toString()
           
 void writeExternal(ObjectOutput out)
           
 
Methods inherited from class org.drools.lang.descr.AnnotatedBaseDescr
addAnnotation, addAnnotation, getAnnotation, getAnnotationNames, getAnnotations
 
Methods inherited from class org.drools.lang.descr.BaseDescr
copyLocation, getColumn, getEndCharacter, getEndColumn, getEndLine, getLine, getStartCharacter, getText, positionAsString, setEndCharacter, setEndLocation, setLocation, setStartCharacter, setText
 
Methods inherited from class java.lang.Object
clone, finalize, getClass, notify, notifyAll, wait, wait, wait
 

Constructor Detail

TypeDeclarationDescr

public TypeDeclarationDescr()

TypeDeclarationDescr

public TypeDeclarationDescr(String typeName)

TypeDeclarationDescr

public TypeDeclarationDescr(String typeName,
                            String typeNamespace)
Method Detail

readExternal

public void readExternal(ObjectInput in)
                  throws IOException,
                         ClassNotFoundException
Specified by:
readExternal in interface Externalizable
Overrides:
readExternal in class AnnotatedBaseDescr
Throws:
IOException
ClassNotFoundException

writeExternal

public void writeExternal(ObjectOutput out)
                   throws IOException
Specified by:
writeExternal in interface Externalizable
Overrides:
writeExternal in class AnnotatedBaseDescr
Throws:
IOException

setNamespace

public void setNamespace(String namespace)
Specified by:
setNamespace in interface Namespaceable

getNamespace

public String getNamespace()
Specified by:
getNamespace in interface Namespaceable

getTypeName

public String getTypeName()
Returns:
the identifier

setTypeName

public void setTypeName(String typeName)
Parameters:
typeName - the identifier to set

getType

public TypeDeclarationDescr.QualifiedName getType()

setType

public void setType(TypeDeclarationDescr.QualifiedName qname)

setType

public void setType(String name,
                    String namespace)

getSuperTypeName

public String getSuperTypeName()

getSuperTypeNamespace

public String getSuperTypeNamespace()

getSupertTypeFullName

public String getSupertTypeFullName()

getFields

public Map<String,TypeFieldDescr> getFields()
Returns:
the fields

setFields

public void setFields(Map<String,TypeFieldDescr> fields)
Parameters:
fields - the fields to set

addField

public void addField(TypeFieldDescr field)

toString

public String toString()
Overrides:
toString in class Object

getSuperTypes

public List<TypeDeclarationDescr.QualifiedName> getSuperTypes()

addSuperType

public void addSuperType(String type)

addSuperType

public void addSuperType(TypeDeclarationDescr.QualifiedName type)

compareTo

public int compareTo(TypeDeclarationDescr descr)
Specified by:
compareTo in interface Comparable<TypeDeclarationDescr>

equals

public boolean equals(Object o)
Overrides:
equals in class Object

hashCode

public int hashCode()
Overrides:
hashCode in class Object


Copyright © 2001-2011 JBoss by Red Hat. All Rights Reserved.