org.drools.lang.descr
Class AnnotatedBaseDescr

java.lang.Object
  extended by org.drools.lang.descr.BaseDescr
      extended by org.drools.lang.descr.AnnotatedBaseDescr
All Implemented Interfaces:
Externalizable, Serializable
Direct Known Subclasses:
RuleDescr, TypeDeclarationDescr, TypeFieldDescr

public class AnnotatedBaseDescr
extends BaseDescr
implements Externalizable

This is the super type for all pattern AST nodes.

See Also:
Serialized Form

Constructor Summary
AnnotatedBaseDescr()
           
 
Method Summary
 AnnotationDescr addAnnotation(AnnotationDescr annotation)
          Assigns a new annotation to this type
 AnnotationDescr addAnnotation(String name, String value)
          Assigns a new annotation to this type with the respective name and value
 AnnotationDescr getAnnotation(String name)
          Returns the annotation with the given name
 Set<String> getAnnotationNames()
          Returns the set of annotation names for this type
 Map<String,AnnotationDescr> getAnnotations()
           
 void readExternal(ObjectInput in)
           
 void writeExternal(ObjectOutput out)
           
 
Methods inherited from class org.drools.lang.descr.BaseDescr
getColumn, getEndCharacter, getEndColumn, getEndLine, getLine, getStartCharacter, getText, setEndCharacter, setEndLocation, setLocation, setStartCharacter, setText
 
Methods inherited from class java.lang.Object
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait
 

Constructor Detail

AnnotatedBaseDescr

public AnnotatedBaseDescr()
Method Detail

readExternal

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

writeExternal

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

addAnnotation

public AnnotationDescr addAnnotation(AnnotationDescr annotation)
Assigns a new annotation to this type

Parameters:
annotation -
Returns:
returns the previous value of this annotation

addAnnotation

public AnnotationDescr addAnnotation(String name,
                                     String value)
Assigns a new annotation to this type with the respective name and value

Parameters:
name -
value -
Returns:
returns the previous value of this annotation

getAnnotation

public AnnotationDescr getAnnotation(String name)
Returns the annotation with the given name

Parameters:
name -

getAnnotationNames

public Set<String> getAnnotationNames()
Returns the set of annotation names for this type

Returns:

getAnnotations

public Map<String,AnnotationDescr> getAnnotations()


Copyright © 2001-2013 JBoss Inc.. All Rights Reserved.