public class GroupElement extends ConditionalElement implements Externalizable
Modifier and Type | Class and Description |
---|---|
static class |
GroupElement.Type
A public enum for CE types
|
Modifier and Type | Field and Description |
---|---|
static GroupElement.Type |
AND |
static GroupElement.Type |
EXISTS |
static GroupElement.Type |
NOT |
static GroupElement.Type |
OR |
Constructor and Description |
---|
GroupElement() |
GroupElement(GroupElement.Type type) |
Modifier and Type | Method and Description |
---|---|
void |
addChild(int index,
RuleConditionElement rce)
Adds the given child as the (index)th child of the this GroupElement
|
GroupElement |
addChild(RuleConditionElement child)
Adds a child to the current GroupElement.
|
GroupElement |
clone()
Clones all Conditional Elements but references the non ConditionalElement children
|
protected GroupElement |
clone(boolean deepClone) |
GroupElement |
cloneOnlyGroup() |
boolean |
containesNode(GroupElement.Type node) |
boolean |
equals(Object object) |
List<RuleConditionElement> |
getChildren() |
Map<String,Declaration> |
getInnerDeclarations()
Returns a Map of declarations that are
visible inside this conditional element
|
Map<String,Declaration> |
getInnerDeclarations(String consequenceName) |
List<RuleConditionElement> |
getNestedElements()
Returs a list of RuleConditionElement's that are nested
inside the current element
|
Map<String,Declaration> |
getOuterDeclarations()
Returns a Map of declarations that are visible
outside this conditional element.
|
Map<String,Declaration> |
getOuterDeclarations(String consequenceName) |
GroupElement.Type |
getType() |
int |
hashCode() |
boolean |
isAnd() |
boolean |
isExists() |
boolean |
isNot() |
boolean |
isOr() |
boolean |
isPatternScopeDelimiter()
Returns true in case this RuleConditionElement delimits
a pattern visibility scope.
|
boolean |
isRoot() |
protected void |
mergeGroupElements(GroupElement parent,
GroupElement child) |
void |
pack()
Optimize the group element subtree by removing redundancies
like an AND inside another AND, OR inside OR, single branches
AND/OR, etc.
|
void |
pack(GroupElement parent) |
void |
readExternal(ObjectInput in) |
Declaration |
resolveDeclaration(String identifier)
Resolves the given identifier in the current scope and
returns the Declaration object for the declaration.
|
void |
setRoot(boolean root) |
void |
setType(GroupElement.Type type) |
String |
toString() |
void |
writeExternal(ObjectOutput out) |
public static final GroupElement.Type AND
public static final GroupElement.Type OR
public static final GroupElement.Type NOT
public static final GroupElement.Type EXISTS
public GroupElement()
public GroupElement(GroupElement.Type type)
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 GroupElement addChild(RuleConditionElement child)
public void addChild(int index, RuleConditionElement rce)
public List<RuleConditionElement> getChildren()
public Map<String,Declaration> getInnerDeclarations()
RuleConditionElement
getInnerDeclarations
in interface RuleConditionElement
public Map<String,Declaration> getInnerDeclarations(String consequenceName)
public Map<String,Declaration> getOuterDeclarations()
RuleConditionElement
getOuterDeclarations
in interface RuleConditionElement
public Map<String,Declaration> getOuterDeclarations(String consequenceName)
public Declaration resolveDeclaration(String identifier)
RuleConditionElement
resolveDeclaration
in interface RuleConditionElement
public void pack()
protected void mergeGroupElements(GroupElement parent, GroupElement child)
public void pack(GroupElement parent)
public GroupElement clone()
clone
in interface RuleConditionElement
clone
in class ConditionalElement
public GroupElement cloneOnlyGroup()
protected GroupElement clone(boolean deepClone)
public GroupElement.Type getType()
public void setType(GroupElement.Type type)
public boolean isAnd()
public boolean isOr()
public boolean isNot()
public boolean isExists()
public List<RuleConditionElement> getNestedElements()
RuleConditionElement
getNestedElements
in interface RuleConditionElement
public boolean isPatternScopeDelimiter()
RuleConditionElement
isPatternScopeDelimiter
in interface RuleConditionElement
public boolean isRoot()
public void setRoot(boolean root)
public boolean containesNode(GroupElement.Type node)
Copyright © 2001–2020 JBoss by Red Hat. All rights reserved.