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:
java.io.Externalizable,java.io.Serializable,Namespaceable
- Direct Known Subclasses:
AbstractClassTypeDeclarationDescr,AndDescr,AnnotationDescr,ConstraintConnectiveDescr,EntryPointDeclarationDescr,EnumLiteralDescr,ExistsDescr,NotDescr,OrDescr,PatternDescr,RuleDescr,TypeFieldDescr,WindowDeclarationDescr
public class AnnotatedBaseDescr extends BaseDescr implements java.io.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(java.lang.String name, java.lang.String value)Assigns a new annotation to this type with the respective name and valueprotected AnnotationDescraddAnnotation(java.lang.String name, AnnotationDescr annotation)AnnotationDescraddAnnotation(AnnotationDescr annotation)Assigns a new annotation to this typeAnnotationDescraddQualifiedAnnotation(AnnotationDescr annotation)AnnotationDescrgetAnnotation(java.lang.Class<? extends java.lang.annotation.Annotation> annotationClass)AnnotationDescrgetAnnotation(java.lang.String name)Returns the annotation with the given namejava.util.Set<java.lang.String>getAnnotationNames()Returns the set of annotation names for this typejava.util.Collection<AnnotationDescr>getAnnotations()booleanhasAnnotation(java.lang.Class<? extends java.lang.annotation.Annotation> annotationClass)booleanhasAnnotation(java.lang.String name)voidindexByFQN(boolean isStrict)voidreadExternal(java.io.ObjectInput in)voidwriteExternal(java.io.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(java.io.ObjectInput in) throws java.io.IOException, java.lang.ClassNotFoundException- Specified by:
readExternalin interfacejava.io.Externalizable- Overrides:
readExternalin classBaseDescr- Throws:
java.io.IOExceptionjava.lang.ClassNotFoundException
-
writeExternal
public void writeExternal(java.io.ObjectOutput out) throws java.io.IOException- Specified by:
writeExternalin interfacejava.io.Externalizable- Overrides:
writeExternalin classBaseDescr- Throws:
java.io.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(java.lang.String name, AnnotationDescr annotation)
-
addAnnotation
public AnnotationDescr addAnnotation(java.lang.String name, java.lang.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(java.lang.String name)
Returns the annotation with the given name- Parameters:
name-
-
getAnnotation
public AnnotationDescr getAnnotation(java.lang.Class<? extends java.lang.annotation.Annotation> annotationClass)
-
hasAnnotation
public boolean hasAnnotation(java.lang.Class<? extends java.lang.annotation.Annotation> annotationClass)
-
hasAnnotation
public boolean hasAnnotation(java.lang.String name)
-
getAnnotationNames
public java.util.Set<java.lang.String> getAnnotationNames()
Returns the set of annotation names for this type- Returns:
-
getAnnotations
public java.util.Collection<AnnotationDescr> getAnnotations()
-
indexByFQN
public void indexByFQN(boolean isStrict)
-
-