Package eu.bandm.tools.paisley
Class Proxy<A>
java.lang.Object
eu.bandm.tools.paisley.Pattern<B>
eu.bandm.tools.paisley.Unary<A,A>
eu.bandm.tools.paisley.Proxy<A>
- Type Parameters:
A
- the target type
- All Implemented Interfaces:
Serializable
,Cloneable
Base class for patterns that contain one subpattern of the same target type.
Methods have default implementations that delegate to the
subpattern.
Subclasses may override methods to add behaviour.
- See Also:
-
Nested Class Summary
Nested classes/interfaces inherited from class eu.bandm.tools.paisley.Pattern
Pattern.Either<A>
-
Field Summary
Fields inherited from class eu.bandm.tools.paisley.Pattern
_left_matched, _target_save, none
-
Constructor Summary
-
Method Summary
Modifier and TypeMethodDescriptionprotected void
compileMatch
(CompilationContext context) protected void
compileMatchAgain
(CompilationContext context) boolean
Attempts to match this pattern against a given object.Methods inherited from class eu.bandm.tools.paisley.Unary
binds, clear, clone, compileClear, compileCut, cut, getBody, isDeterministic, matchAgain, preserves, preserves, setBody, toString
Methods inherited from class eu.bandm.tools.paisley.Pattern
all, all, all, all, all, and, andThen, andThen, any, aside, both, clear, compile, compileClear, compileCut, compileIsDeterministic, compileSubPattern, compileThis, compileUpTo, cut, DEBUG, either, enPassant, flatten, limit, main, matchOnce, matchVar, narrow, newAll, noMatch, none, of, once, or, orElse, orElse, repeat, some, some, some, some, someMatch, startCompile, uniquely, variable, variable
-
Constructor Details
-
Proxy
Creates a new pattern. -
Proxy
protected Proxy()
-
-
Method Details
-
match
Attempts to match this pattern against a given object. If the class of this pattern imposes a specific order on matches, the first one is chosen.The default implementation delegates to
body
. -
compileMatch
- Overrides:
compileMatch
in classPattern<A>
-
compileMatchAgain
- Overrides:
compileMatchAgain
in classPattern<A>
-