Package org.drools.compiler.lang.descr
Class RuleDescr
- java.lang.Object
-
- org.drools.compiler.lang.descr.BaseDescr
-
- org.drools.compiler.lang.descr.AnnotatedBaseDescr
-
- org.drools.compiler.lang.descr.RuleDescr
-
- All Implemented Interfaces:
Externalizable
,Serializable
,org.drools.core.rule.Annotated
,org.drools.core.rule.Dialectable
,org.drools.core.rule.Namespaceable
- Direct Known Subclasses:
QueryDescr
public class RuleDescr extends AnnotatedBaseDescr implements org.drools.core.rule.Dialectable
- See Also:
- Serialized Form
-
-
Method Summary
-
Methods inherited from class org.drools.compiler.lang.descr.AnnotatedBaseDescr
addAnnotation, addAnnotation, addAnnotation, addQualifiedAnnotation, getAnnotation, getAnnotation, getAnnotationNames, getAnnotations, getTypedAnnotation, hasAnnotation, indexByFQN
-
Methods inherited from class org.drools.compiler.lang.descr.BaseDescr
accept, copyLocation, getColumn, getEndCharacter, getEndColumn, getEndLine, getLine, getNamespace, getResource, getStartCharacter, getText, isNegated, negate, positionAsString, replaceVariable, setEndCharacter, setEndLocation, setLocation, setNamespace, setStartCharacter, setText
-
-
-
-
Method Detail
-
readExternal
public void readExternal(ObjectInput in) throws IOException, ClassNotFoundException
- Specified by:
readExternal
in interfaceExternalizable
- Overrides:
readExternal
in classAnnotatedBaseDescr
- Throws:
IOException
ClassNotFoundException
-
writeExternal
public void writeExternal(ObjectOutput out) throws IOException
- Specified by:
writeExternal
in interfaceExternalizable
- Overrides:
writeExternal
in classAnnotatedBaseDescr
- Throws:
IOException
-
toRule
public org.drools.core.definitions.rule.impl.RuleImpl toRule()
-
getUnit
public UnitDescr getUnit()
-
setUnit
public void setUnit(UnitDescr unit)
-
getName
public String getName()
-
setName
public void setName(String name)
-
getDialect
public String getDialect()
- Specified by:
getDialect
in interfaceorg.drools.core.rule.Dialectable
-
getSalience
public String getSalience()
-
getClassName
public String getClassName()
-
setClassName
public void setClassName(String className)
-
getDocumentation
public String getDocumentation()
-
getAttributes
public Map<String,AttributeDescr> getAttributes()
-
addAttribute
public void addAttribute(AttributeDescr attribute)
-
getLhs
public AndDescr getLhs()
-
setLhs
public void setLhs(AndDescr lhs)
-
getConsequence
public Object getConsequence()
-
setConsequence
public void setConsequence(Object consequence)
-
setConsequenceLocation
public void setConsequenceLocation(int line, int pattern)
-
setConsequenceOffset
public void setConsequenceOffset(int offset)
-
getConsequenceOffset
public int getConsequenceOffset()
-
getConsequenceLine
public int getConsequenceLine()
-
getConsequencePattern
public int getConsequencePattern()
-
getEnabled
public String getEnabled()
-
hasParent
public boolean hasParent()
-
setParentName
public void setParentName(String parentName)
-
getParentName
public String getParentName()
-
isRule
public boolean isRule()
-
isQuery
public boolean isQuery()
-
hasErrors
public boolean hasErrors()
-
getLoadOrder
public int getLoadOrder()
-
setLoadOrder
public void setLoadOrder(int loadOrder)
-
setResource
public void setResource(org.kie.api.io.Resource resource)
- Overrides:
setResource
in classBaseDescr
-
lookAheadFieldsOfIdentifier
public Collection<String> lookAheadFieldsOfIdentifier(PatternDescr patternDescr)
-
-