|
||||||||||
| PREV CLASS NEXT CLASS | FRAMES NO FRAMES | |||||||||
| SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD | |||||||||
java.lang.Objectorg.overturetool.vdmj.patterns.Pattern
public abstract class Pattern
The parent type of all patterns.
| Field Summary | |
|---|---|
LexLocation |
location
The textual location of the pattern. |
| Constructor Summary | |
|---|---|
Pattern(LexLocation location)
Create a pattern at the given location. |
|
| Method Summary | |
|---|---|
void |
detail(java.lang.String tag,
java.lang.Object obj)
|
void |
detail2(java.lang.String tag1,
java.lang.Object obj1,
java.lang.String tag2,
java.lang.Object obj2)
|
abstract DefinitionList |
getDefinitions(Type type,
NameScope scope)
Get a list of definitions for the pattern's variables. |
int |
getLength()
|
abstract Expression |
getMatchingExpression()
An expression that matches the pattern. |
abstract NameValuePairList |
getNamedValues(Value expval,
Context ctxt)
Get a name/value pair list for the pattern's variables. |
abstract Type |
getPossibleType()
Get the type(s) that could match this pattern. |
LexNameList |
getVariableNames()
|
boolean |
isConstrained()
|
void |
patternFail(int number,
java.lang.String msg)
Throw a PatternMatchException with the given message. |
Value |
patternFail(ValueException ve)
Throw a PatternMatchException with a message from the ValueException. |
void |
report(int number,
java.lang.String msg)
|
abstract java.lang.String |
toString()
|
void |
typeResolve(Environment env)
Resolve any types that the pattern may use by looking up the type names in the environment passed. |
void |
unResolve()
Clear the recursive type resolution flag. |
| Methods inherited from class java.lang.Object |
|---|
clone, equals, finalize, getClass, hashCode, notify, notifyAll, wait, wait, wait |
| Field Detail |
|---|
public final LexLocation location
| Constructor Detail |
|---|
public Pattern(LexLocation location)
| Method Detail |
|---|
public abstract java.lang.String toString()
toString in class java.lang.Objectpublic void typeResolve(Environment env)
env - The environment to resolve types.public void unResolve()
public abstract DefinitionList getDefinitions(Type type,
NameScope scope)
public abstract NameValuePairList getNamedValues(Value expval,
Context ctxt)
throws PatternMatchException
PatternMatchExceptionpublic abstract Type getPossibleType()
public LexNameList getVariableNames()
public int getLength()
public boolean isConstrained()
public abstract Expression getMatchingExpression()
public void report(int number,
java.lang.String msg)
Definition.report(int, java.lang.String)
public void patternFail(int number,
java.lang.String msg)
throws PatternMatchException
PatternMatchException
public Value patternFail(ValueException ve)
throws PatternMatchException
PatternMatchException
public void detail(java.lang.String tag,
java.lang.Object obj)
Definition.detail(java.lang.String, java.lang.Object)
public void detail2(java.lang.String tag1,
java.lang.Object obj1,
java.lang.String tag2,
java.lang.Object obj2)
Definition.detail2(java.lang.String, java.lang.Object, java.lang.String, java.lang.Object)
|
||||||||||
| PREV CLASS NEXT CLASS | FRAMES NO FRAMES | |||||||||
| SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD | |||||||||