de.intarsys.tools.functor
Class ArgumentDeclarator
java.lang.Object
de.intarsys.tools.functor.ArgumentDeclarator
public class ArgumentDeclarator
- extends Object
An argument declaration strategy that modifies its input IArgs
according to the IDeclaration.
Every ArgumentDeclaration instance is applied to the input args.
- A name is associated
- An optional default is assigned
- An optional type casting is applied
The ArgumentDeclarator knows three declaration "modes".
- !strict (default)
Any input args are preserved, declared args are
applied or added.
- strict && !lazy
Only input args that occur in the declaration are
preserved, all others cleared.
- strict && lazy
If there are no ArgumentDeclaration
declarations, the input args are preserved. If there is any
ArgumentDeclaration, the behavior switches to "strict".
ArgumentDeclarator
public ArgumentDeclarator()
ArgumentDeclarator
public ArgumentDeclarator(boolean strict,
boolean lazy)
apply
public IArgs apply(IDeclarationBlock declarationBlock,
IArgs args)
throws DeclarationException
- Throws:
DeclarationException
Copyright © 2012 intarsys consulting GmbH. All Rights Reserved.