org.overturetool.vdmj.patterns
Class IgnorePattern

java.lang.Object
  extended by org.overturetool.vdmj.patterns.Pattern
      extended by org.overturetool.vdmj.patterns.IgnorePattern
All Implemented Interfaces:
java.io.Serializable

public class IgnorePattern
extends Pattern

See Also:
Serialized Form

Field Summary
 
Fields inherited from class org.overturetool.vdmj.patterns.Pattern
location
 
Constructor Summary
IgnorePattern(LexLocation location)
           
 
Method Summary
 DefinitionList getDefinitions(Type type, NameScope scope)
          Get a list of definitions for the pattern's variables.
 int getLength()
           
 Expression getMatchingExpression()
          An expression that matches the pattern.
 NameValuePairList getNamedValues(Value expval, Context ctxt)
          Get a name/value pair list for the pattern's variables.
 Type getPossibleType()
          Get the type(s) that could match this pattern.
 boolean isConstrained()
           
 java.lang.String toString()
           
 
Methods inherited from class org.overturetool.vdmj.patterns.Pattern
detail, detail2, getVariableNames, patternFail, patternFail, report, typeResolve, unResolve
 
Methods inherited from class java.lang.Object
clone, equals, finalize, getClass, hashCode, notify, notifyAll, wait, wait, wait
 

Constructor Detail

IgnorePattern

public IgnorePattern(LexLocation location)
Method Detail

toString

public java.lang.String toString()
Specified by:
toString in class Pattern

getMatchingExpression

public Expression getMatchingExpression()
Description copied from class: Pattern
An expression that matches the pattern. This is used in PO generation when parameter patterns have to be passed to pre/post conditions as arguments. The result is almost the same as toString(), except for IgnorePatterns, which produce "don't care" variables.

Specified by:
getMatchingExpression in class Pattern
Returns:
An expression, being a value that matches the pattern.

getDefinitions

public DefinitionList getDefinitions(Type type,
                                     NameScope scope)
Description copied from class: Pattern
Get a list of definitions for the pattern's variables.

Specified by:
getDefinitions in class Pattern

getLength

public int getLength()
Overrides:
getLength in class Pattern
Returns:
The "length" of the pattern (eg. sequence and set patterns).

getNamedValues

public NameValuePairList getNamedValues(Value expval,
                                        Context ctxt)
Description copied from class: Pattern
Get a name/value pair list for the pattern's variables.

Specified by:
getNamedValues in class Pattern

getPossibleType

public Type getPossibleType()
Description copied from class: Pattern
Get the type(s) that could match this pattern.

Specified by:
getPossibleType in class Pattern

isConstrained

public boolean isConstrained()
Overrides:
isConstrained in class Pattern
Returns:
True if the pattern has constraints, such that matching values should be permuted, where necessary, to find a match.


Copyright © 2009. All Rights Reserved.