Package org.drools.drl.ast.descr
Class AnnotatedBaseDescr
- java.lang.Object
-
- org.drools.drl.ast.descr.BaseDescr
-
- org.drools.drl.ast.descr.AnnotatedBaseDescr
-
- All Implemented Interfaces:
Externalizable,Serializable,Namespaceable
- Direct Known Subclasses:
AbstractClassTypeDeclarationDescr,AndDescr,AnnotationDescr,ConstraintConnectiveDescr,EntryPointDeclarationDescr,EnumLiteralDescr,ExistsDescr,NotDescr,OrDescr,PatternDescr,RuleDescr,TypeFieldDescr,WindowDeclarationDescr
public class AnnotatedBaseDescr extends BaseDescr implements Externalizable
This is the super type for all pattern AST nodes.- See Also:
- Serialized Form
-
-
Constructor Summary
Constructors Constructor Description AnnotatedBaseDescr()
-
Method Summary
All Methods Instance Methods Concrete Methods Modifier and Type Method Description AnnotationDescraddAnnotation(String name, String value)Assigns a new annotation to this type with the respective name and valueprotected AnnotationDescraddAnnotation(String name, AnnotationDescr annotation)AnnotationDescraddAnnotation(AnnotationDescr annotation)Assigns a new annotation to this typeAnnotationDescraddQualifiedAnnotation(AnnotationDescr annotation)AnnotationDescrgetAnnotation(Class<? extends Annotation> annotationClass)AnnotationDescrgetAnnotation(String name)Returns the annotation with the given nameSet<String>getAnnotationNames()Returns the set of annotation names for this typeCollection<AnnotationDescr>getAnnotations()booleanhasAnnotation(Class<? extends Annotation> annotationClass)booleanhasAnnotation(String name)voidindexByFQN(boolean isStrict)voidreadExternal(ObjectInput in)voidwriteExternal(ObjectOutput out)-
Methods inherited from class org.drools.drl.ast.descr.BaseDescr
accept, copyLocation, getColumn, getEndCharacter, getEndColumn, getEndLine, getLine, getNamespace, getResource, getStartCharacter, getText, isNegated, negate, positionAsString, replaceVariable, setEndCharacter, setEndLocation, setLocation, setNamespace, setResource, setStartCharacter, setText
-
-
-
-
Method Detail
-
readExternal
public void readExternal(ObjectInput in) throws IOException, ClassNotFoundException
- Specified by:
readExternalin interfaceExternalizable- Overrides:
readExternalin classBaseDescr- Throws:
IOExceptionClassNotFoundException
-
writeExternal
public void writeExternal(ObjectOutput out) throws IOException
- Specified by:
writeExternalin interfaceExternalizable- Overrides:
writeExternalin classBaseDescr- 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
-
addQualifiedAnnotation
public AnnotationDescr addQualifiedAnnotation(AnnotationDescr annotation)
-
addAnnotation
protected AnnotationDescr addAnnotation(String name, AnnotationDescr 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-
-
getAnnotation
public AnnotationDescr getAnnotation(Class<? extends Annotation> annotationClass)
-
hasAnnotation
public boolean hasAnnotation(Class<? extends Annotation> annotationClass)
-
hasAnnotation
public boolean hasAnnotation(String name)
-
getAnnotationNames
public Set<String> getAnnotationNames()
Returns the set of annotation names for this type- Returns:
-
getAnnotations
public Collection<AnnotationDescr> getAnnotations()
-
indexByFQN
public void indexByFQN(boolean isStrict)
-
-