intarsys runtime library

de.intarsys.tools.functor
Interface IDeclaration

All Known Subinterfaces:
IArgumentDeclaration, IDeclarationBlock, IDeclarationElement
All Known Implementing Classes:
ArgumentDeclaration, Declaration, DeclarationBlock, DeclarationElement

public interface IDeclaration

A declaration allows to modify the state and or behavior of an IFunctorCall. The IDeclaration is attached to an object owning an IFunctor and should be executed against the IFunctorCall prior 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 IFunctorCall of declarations are up to the client.


Method Summary
 IDeclaration copy()
          Create a copy of this.
 Object getDeclarationContext()
          An optional declaration context.
 boolean isBlock()
          true if this declaration has child elements itself.
 

Method Detail

copy

IDeclaration copy()
Create a copy of this.

Returns:
A copy of this.

getDeclarationContext

Object getDeclarationContext()
An optional declaration context. This may be for example the object that will launch the IFunctorCall later and has parsed some declarations on startup.

Returns:
An optional declaration context.

isBlock

boolean isBlock()
true if this declaration has child elements itself.

A IDeclarationElement may be a IDeclarationBlock, supporting nested declarations. You should not use "instanceof IDeclarationBlock" to check this behavior but this method.

Returns:
true if this declaration has child elements itself.

intarsys runtime library

Copyright © 2012 intarsys consulting GmbH. All Rights Reserved.