public class GenericEMFPatternPQuery extends BasePQuery implements InitializablePQuery
End users should use {link GenericQuerySpecification} instead.
PQuery.PQueryStatus
Constructor and Description |
---|
GenericEMFPatternPQuery(Pattern pattern)
Initializes a generic query representation for a given pattern.
|
GenericEMFPatternPQuery(Pattern pattern,
boolean delayedInitialization)
Initializes a generic query specification for a given pattern.
|
Modifier and Type | Method and Description |
---|---|
void |
addAnnotation(PAnnotation annotation)
Adds an annotation to the specification.
|
void |
addError(PProblem problem)
Adds a detected error.
|
boolean |
equals(java.lang.Object obj) |
PDisjunction |
getDisjunctBodies()
Returns all bodies associated with the query in their canonical form.
|
java.lang.String |
getFullyQualifiedName()
Identifies the pattern for which matchers can be instantiated.
|
java.util.List<PParameter> |
getParameters()
Returns a list of parameter descriptions
|
Pattern |
getPattern() |
int |
hashCode() |
void |
initializeBodies(java.util.Set<PBody> bodies)
Sets up the bodies stored inside this query specification.
|
void |
setStatus(PQuery.PQueryStatus newStatus)
Sets the query status.
|
checkMutability, ensureInitialized, ensureInitializedSneaky, getAllAnnotations, getAllReferredQueries, getAnnotationsByName, getDirectReferredQueries, getEvaluationHints, getFirstAnnotationByName, getParameterNames, getPositionOfParameter, getPProblems, getStatus, isMutable, publishedAs
getClass, notify, notifyAll, toString, wait, wait, wait
checkMutability, ensureInitialized, getAllReferredQueries, getDirectReferredQueries, getEvaluationHints, getPProblems, getStatus, isMutable, publishedAs
getAllAnnotations, getAnnotationsByName, getFirstAnnotationByName, getParameterNames, getPositionOfParameter
public GenericEMFPatternPQuery(Pattern pattern) throws QueryInitializationException
Warning: it is not recommended to directly instantiate GenericPQuery instances as
they will not reuse previously built specifications- use SpecificationBuilder
instead.
pattern
- the pattern for which the matcher is to be constructed.QueryInitializationException
public GenericEMFPatternPQuery(Pattern pattern, boolean delayedInitialization) throws QueryInitializationException
pattern
- the pattern for which matchers are to be constructed.delayedInitialization
- true if the query is not created automatically - in this case before use the
initializeBodies(Set)
methodQueryInitializationException
public Pattern getPattern()
public boolean equals(java.lang.Object obj)
equals
in class java.lang.Object
public int hashCode()
hashCode
in class java.lang.Object
public java.lang.String getFullyQualifiedName()
PQueryHeader
getFullyQualifiedName
in interface PQueryHeader
public java.util.List<PParameter> getParameters()
PQueryHeader
getParameters
in interface PQueryHeader
public PDisjunction getDisjunctBodies()
PQuery
getDisjunctBodies
in interface PQuery
getDisjunctBodies
in class BasePQuery
public void addAnnotation(PAnnotation annotation)
InitializablePQuery
uninitialized
.addAnnotation
in interface InitializablePQuery
public void initializeBodies(java.util.Set<PBody> bodies) throws QueryInitializationException
initializeBodies
in interface InitializablePQuery
bodies
- a non-empty set of PBody
instancesQueryInitializationException
public final void setStatus(PQuery.PQueryStatus newStatus)
InitializablePQuery
uninitialized
.setStatus
in interface InitializablePQuery
newStatus
- the new statuspublic void addError(PProblem problem)
InitializablePQuery
uninitialized
.addError
in interface InitializablePQuery
problem
- the new problem