Package de.intarsys.tools.functor
Interface IDeclaration
-
- All Known Subinterfaces:
IArgumentDeclaration,IDeclarationBlock,IDeclarationElement
- All Known Implementing Classes:
ArgumentDeclaration,Declaration,DeclarationBlock,DeclarationElement,EmptyDeclarationBlock
public interface IDeclarationA declaration allows to modify the state and or behavior of anIFunctorCall. TheIDeclarationis attached to an object owning anIFunctorand should be executed against theIFunctorCallprior to performing the call.An example for a declaration is
IArgumentDeclaration, allowing for argument naming and ordering and to provide default values when an argument is missing.Syntax, semantics and application to the
IFunctorCallof declarations are up to the client.
-
-
Method Summary
All Methods Instance Methods Abstract Methods Modifier and Type Method Description IFunctorCallaccept(IFunctorCall call)Apply this declaration tocall.java.lang.ObjectgetDeclarationContext()An optional declaration context.booleanisBlock()trueif this declaration has child elements itself.
-
-
-
Method Detail
-
accept
IFunctorCall accept(IFunctorCall call) throws DeclarationException
Apply this declaration tocall.The semantics of this method is up to the designer.
- Parameters:
call- TheIFunctorCallto be modified.- Returns:
- The modified or new
IFunctorCall. - Throws:
DeclarationException
-
getDeclarationContext
java.lang.Object getDeclarationContext()
An optional declaration context. This may be for example the object that will launch theIFunctorCalllater and has parsed some declarations on startup.- Returns:
- An optional declaration context.
-
isBlock
boolean isBlock()
trueif this declaration has child elements itself.A
IDeclarationElementmay be aIDeclarationBlock, supporting nested declarations. You should not use "instanceof IDeclarationBlock" to check this behavior but this method.- Returns:
trueif this declaration has child elements itself.
-
-