Interface MacroDeclarations
- All Known Implementing Classes:
IfElseMacro,InstancesHelper,JavaMacro,MacroDeclarationsCompositor,MathFunctions,NoMacros
public interface MacroDeclarations
Interface to expose macros to a program.
It is deliberately kept very simple to give as little constraints
as possible to implementations.
There is an implied invariant here:
hasMacro(String) == true ->
getMacro(String) != null
hasMacro(String) should be pure i.e. have no side effects.
Whereas getMacro(String) may have side effects.
(This is useful for creating macros on the fly in getMacro(String))- Version:
- $Revision: 1000 $
- Author:
- Benjamin Weber ( benweber at student dot ethz dot ch )
-
Method Summary
-
Method Details
-
hasMacro
Whether the macro is declared- Parameters:
name- name of the macro being queried- Returns:
- whether the macro is declared
-
getMacro
Tries to fetch the macro Before a macro is fetched it shold be checked whether it is declared throughhasMacro(String)- Parameters:
name-- Returns:
-