org.overturetool.vdmj.patterns
Class RealPattern

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

public class RealPattern
extends Pattern

See Also:
Serialized Form

Field Summary
 LexRealToken value
           
 
Fields inherited from class org.overturetool.vdmj.patterns.Pattern
location
 
Constructor Summary
RealPattern(LexRealToken token)
           
 
Method Summary
 DefinitionList getDefinitions(Type type, NameScope scope)
          Get a list of definitions for the pattern's variables.
 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.
 java.lang.String toString()
           
 
Methods inherited from class org.overturetool.vdmj.patterns.Pattern
detail, detail2, getLength, getVariableNames, isConstrained, patternFail, patternFail, report, typeResolve, unResolve
 
Methods inherited from class java.lang.Object
clone, equals, finalize, getClass, hashCode, notify, notifyAll, wait, wait, wait
 

Field Detail

value

public final LexRealToken value
Constructor Detail

RealPattern

public RealPattern(LexRealToken token)
Method Detail

toString

public java.lang.String toString()
Specified by:
toString in class 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

getNamedValues

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

Specified by:
getNamedValues in class Pattern
Throws:
PatternMatchException

getPossibleType

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

Specified by:
getPossibleType 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.


Copyright © 2009. All Rights Reserved.