| java.lang.Object kawa.lang.Pattern
All known Subclasses: kawa.lang.PairPat, kawa.lang.AnyPat, kawa.lang.EqualPat, kawa.lang.ListPat, kawa.lang.VarListPat, kawa.lang.SyntaxPattern, kawa.lang.ListRepeatPat,
Pattern | abstract public class Pattern implements Printable(Code) | | A Pattern is used to match against objects.
E.g. it can be used to match against macro arguments.
author: Per Bothner |
Method Summary | |
public Object[] | match(Object obj) Match this Pattern against an object. | abstract public boolean | match(Object obj, Object[] vars, int start_vars) Match this Pattern against an Object. | abstract public int | varCount() |
matchPatternMethod | final public static Method matchPatternMethod(Code) | | |
match | public Object[] match(Object obj)(Code) | | Match this Pattern against an object.
Parameters: obj - object to match against this pattern null on failure, or an array of bound pattern variables. |
match | abstract public boolean match(Object obj, Object[] vars, int start_vars)(Code) | | Match this Pattern against an Object.
Parameters: obj - the Object to match against Parameters: vars - the "pattern variable" values extracted from obj go here Parameters: start_vars - where in vars to strt putting the varCount() values true iff the match succeeded. |
varCount | abstract public int varCount()(Code) | | |
|
|