public class Pattern extends Object implements RuleConditionElement, AcceptsClassObjectType, Externalizable
Modifier and Type | Field and Description |
---|---|
static String |
ATTR_LISTENED_PROPS |
Constructor and Description |
---|
Pattern() |
Pattern(int index,
int offset,
ObjectType objectType,
String identifier) |
Pattern(int index,
int offset,
ObjectType objectType,
String identifier,
boolean isInternalFact) |
Pattern(int index,
ObjectType objectType) |
Pattern(int index,
ObjectType objectType,
String identifier) |
Modifier and Type | Method and Description |
---|---|
void |
addBehavior(Behavior behavior) |
void |
addConstraint(Constraint constraint) |
void |
addDeclaration(Declaration decl) |
Declaration |
addDeclaration(String identifier) |
Pattern |
clone()
Returns a clone from itself
|
boolean |
equals(Object object) |
Map<String,AnnotationDefinition> |
getAnnotations() |
List<Behavior> |
getBehaviors() |
List<MvelConstraint> |
getCombinableConstraints() |
List<Constraint> |
getConstraints() |
Declaration |
getDeclaration() |
Declaration |
getDeclaration(String identifier) |
int |
getIndex() |
Map<String,Declaration> |
getInnerDeclarations()
Returns a Map of declarations that are
visible inside this conditional element
|
List<String> |
getListenedProperties() |
List |
getNestedElements()
Returs a list of RuleConditionElement's that are nested
inside the current element
|
ObjectType |
getObjectType() |
int |
getOffset()
The offset of the fact related to this pattern
inside the tuple
|
Map<String,Declaration> |
getOuterDeclarations()
Returns a Map of declarations that are visible
outside this conditional element.
|
static InternalReadAccessor |
getReadAcessor(ObjectType objectType) |
Declaration[] |
getRequiredDeclarations() |
PatternSource |
getSource() |
int |
hashCode() |
boolean |
isBound() |
boolean |
isPatternScopeDelimiter()
Returns true in case this RuleConditionElement delimits
a pattern visibility scope.
|
void |
readExternal(ObjectInput in) |
void |
removeConstraint(Constraint constraint) |
Declaration |
resolveDeclaration(String identifier)
Resolves the given identifier in the current scope and
returns the Declaration object for the declaration.
|
void |
setAnnotations(Map<String,AnnotationDefinition> annotations) |
void |
setBehaviors(List<Behavior> behaviors) |
void |
setClassObjectType(ClassObjectType objectType) |
void |
setListenedProperties(List<String> listenedProperties) |
void |
setObjectType(ObjectType objectType) |
void |
setOffset(int offset) |
void |
setSource(PatternSource source) |
String |
toString() |
void |
writeExternal(ObjectOutput out) |
public static final String ATTR_LISTENED_PROPS
public Pattern()
public Pattern(int index, ObjectType objectType)
public Pattern(int index, ObjectType objectType, String identifier)
public Pattern(int index, int offset, ObjectType objectType, String identifier)
public Pattern(int index, int offset, ObjectType objectType, String identifier, boolean isInternalFact)
public void readExternal(ObjectInput in) throws IOException, ClassNotFoundException
readExternal
in interface Externalizable
IOException
ClassNotFoundException
public void writeExternal(ObjectOutput out) throws IOException
writeExternal
in interface Externalizable
IOException
public static InternalReadAccessor getReadAcessor(ObjectType objectType)
public void setClassObjectType(ClassObjectType objectType)
setClassObjectType
in interface AcceptsClassObjectType
public Declaration[] getRequiredDeclarations()
public Pattern clone()
RuleConditionElement
clone
in interface RuleConditionElement
clone
in class Object
public ObjectType getObjectType()
public void setObjectType(ObjectType objectType)
public PatternSource getSource()
public void setSource(PatternSource source)
public List<Constraint> getConstraints()
public void addConstraint(Constraint constraint)
public void removeConstraint(Constraint constraint)
public List<MvelConstraint> getCombinableConstraints()
public Declaration addDeclaration(String identifier)
public void addDeclaration(Declaration decl)
public boolean isBound()
public Declaration getDeclaration()
public Declaration getDeclaration(String identifier)
public int getIndex()
public int getOffset()
public void setOffset(int offset)
public Map<String,Declaration> getInnerDeclarations()
RuleConditionElement
getInnerDeclarations
in interface RuleConditionElement
public Map<String,Declaration> getOuterDeclarations()
RuleConditionElement
getOuterDeclarations
in interface RuleConditionElement
public Declaration resolveDeclaration(String identifier)
RuleConditionElement
resolveDeclaration
in interface RuleConditionElement
public List getNestedElements()
RuleConditionElement
getNestedElements
in interface RuleConditionElement
public boolean isPatternScopeDelimiter()
RuleConditionElement
isPatternScopeDelimiter
in interface RuleConditionElement
public void setBehaviors(List<Behavior> behaviors)
behaviors
- the behaviors to setpublic void addBehavior(Behavior behavior)
public Map<String,AnnotationDefinition> getAnnotations()
public void setAnnotations(Map<String,AnnotationDefinition> annotations)
Copyright © 2001-2014 JBoss by Red Hat. All Rights Reserved.