|
||||||||||
PREV CLASS NEXT CLASS | FRAMES NO FRAMES | |||||||||
SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD |
java.lang.Object org.eclipse.emf.query.conditions.Condition org.eclipse.emf.query.conditions.eobjects.EObjectCondition org.eclipse.emf.query.conditions.eobjects.EObjectTypeRelationCondition
public class EObjectTypeRelationCondition
An EObjectCondition
specialization to be used for evaluating
the inheritance/type relationship of an EObject
to another
using the EObjects' EClasses. For example it could be used to find if a given
EObject
is a subtype/supertype of another EObject
.
TypeRelation
Field Summary | |
---|---|
static EObjectTypeRelationCondition |
UNDEFINED
A constant EObjectTypeRelationCondition object used to
indicate that the type relationship is undefined and hence it is always
satisfied. |
Fields inherited from class org.eclipse.emf.query.conditions.eobjects.EObjectCondition |
---|
E_FALSE, E_TRUE |
Fields inherited from class org.eclipse.emf.query.conditions.Condition |
---|
FALSE, TRUE |
Constructor Summary | |
---|---|
EObjectTypeRelationCondition(EClass type)
A Simple constructor, it initializes the EObjectTypeRelationCondition with the given
EClass . |
|
EObjectTypeRelationCondition(EClass type,
PruneHandler pruneHandler)
A constructor, it initializes the EObjectTypeRelationCondition with the given
EClass . |
|
EObjectTypeRelationCondition(EClass type,
TypeRelation typeRelationKind)
A constructor, it initializes the EObjectTypeRelationCondition with the given
EClass and the TypeRelation specified. |
|
EObjectTypeRelationCondition(EClass type,
TypeRelation typeRelationKind,
PruneHandler pruneHandler)
A constructor, it initializes the EObjectTypeRelationCondition with the given
EClass , the TypeRelation and the
PruneHandler specified. |
Method Summary | |
---|---|
boolean |
isSatisfied(EObject eObject)
Evaluates this EObjectTypeRelationCondition , basically it
answers the following question: Is the passed eObject's
EClass is a TypeRelation to this
EObjectTypeRelationCondition 's primary type/
EClass ? |
Methods inherited from class org.eclipse.emf.query.conditions.eobjects.EObjectCondition |
---|
AND, EQUIVALENT, getPruneHandler, IMPLIES, isSatisfied, OR, shouldPrune, XOR |
Methods inherited from class org.eclipse.emf.query.conditions.Condition |
---|
AND, EQUIVALENT, IMPLIES, OR, XOR |
Methods inherited from class java.lang.Object |
---|
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait |
Field Detail |
---|
public static final EObjectTypeRelationCondition UNDEFINED
EObjectTypeRelationCondition
object used to
indicate that the type relationship is undefined and hence it is always
satisfied.
Constructor Detail |
---|
public EObjectTypeRelationCondition(EClass type)
EObjectTypeRelationCondition
with the given
EClass
. It defaults to using
TypeRelation.SAMETYPE_LITERAL as its relationship of interest and
PruneHandler.NEVER to handle pruning
type
- The EClass
the primary type to check againstpublic EObjectTypeRelationCondition(EClass type, PruneHandler pruneHandler)
EObjectTypeRelationCondition
with the given
EClass
. It defaults to using
TypeRelation.SAMETYPE_LITERAL as its relationship of interest.
type
- The EClass
the primary type to check againstpruneHandler
- The prune handlerpublic EObjectTypeRelationCondition(EClass type, TypeRelation typeRelationKind)
EObjectTypeRelationCondition
with the given
EClass
and the TypeRelation
specified. It
defaults to using PruneHandler.NEVER to handle pruning
type
- The EClass
the primary type to check againsttypeRelationKind
- The relationship kind between the primary type argument and
other EObjects to test for when evaluating this
EObjectTypeRelationCondition
.public EObjectTypeRelationCondition(EClass type, TypeRelation typeRelationKind, PruneHandler pruneHandler)
EObjectTypeRelationCondition
with the given
EClass
, the TypeRelation
and the
PruneHandler specified.
type
- The EClass
the primary type to check againsttypeRelationKind
- typeRelationKind The relationship kind between the primary
type argument and other EObjects to test for when evaluating
this EObjectTypeRelationCondition
.pruneHandler
- The prune handlerMethod Detail |
---|
public boolean isSatisfied(EObject eObject)
EObjectTypeRelationCondition
, basically it
answers the following question: Is the passed eObject's
EClass
is a TypeRelation
to this
EObjectTypeRelationCondition
's primary type/
EClass
?
isSatisfied
in class EObjectCondition
eObject
- the EObject
to check
true
if the argument eObject satisfies
this EObjectCondition
EObjectCondition.isSatisfied(org.eclipse.emf.ecore.EObject)
|
Copyright 2002, 2007 IBM Corporation and others. All Rights Reserved. |
|||||||||
PREV CLASS NEXT CLASS | FRAMES NO FRAMES | |||||||||
SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD |