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
|
void |
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 |
setForallBaseObjectType(ObjectType objectType) |
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 ExternalizableIOExceptionClassNotFoundExceptionpublic void writeExternal(ObjectOutput out) throws IOException
writeExternal in interface ExternalizableIOExceptionpublic void addChild(RuleConditionElement child)
public void addChild(int index,
RuleConditionElement rce)
public List<RuleConditionElement> getChildren()
public Map<String,Declaration> getInnerDeclarations()
RuleConditionElementgetInnerDeclarations in interface RuleConditionElementpublic Map<String,Declaration> getInnerDeclarations(String consequenceName)
public Map<String,Declaration> getOuterDeclarations()
RuleConditionElementgetOuterDeclarations in interface RuleConditionElementpublic Map<String,Declaration> getOuterDeclarations(String consequenceName)
public Declaration resolveDeclaration(String identifier)
RuleConditionElementresolveDeclaration in interface RuleConditionElementpublic void setForallBaseObjectType(ObjectType objectType)
public void pack()
protected void mergeGroupElements(GroupElement parent, GroupElement child)
public void pack(GroupElement parent)
public GroupElement clone()
clone in interface RuleConditionElementclone in class ConditionalElementpublic 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()
RuleConditionElementgetNestedElements in interface RuleConditionElementpublic boolean isPatternScopeDelimiter()
RuleConditionElementisPatternScopeDelimiter in interface RuleConditionElementpublic boolean isRoot()
public void setRoot(boolean root)
public boolean containesNode(GroupElement.Type node)
Copyright © 2001–2015 JBoss by Red Hat. All rights reserved.