Interface MacroDeclarations
-
- All Known Implementing Classes:
IfElseMacro,InstancesHelper,JavaMacro,MacroDeclarationsCompositor,MathFunctions,NoMacros
public interface MacroDeclarationsInterface 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)!= nullhasMacro(String)should be pure i.e. have no side effects. WhereasgetMacro(String)may have side effects. (This is useful for creating macros on the fly ingetMacro(String))- Version:
- $Revision: 1000 $
- Author:
- Benjamin Weber ( benweber at student dot ethz dot ch )
-
-
Method Summary
All Methods Instance Methods Abstract Methods Modifier and Type Method Description MacrogetMacro(java.lang.String name)Tries to fetch the macrobooleanhasMacro(java.lang.String name)Whether the macro is declared
-
-
-
Method Detail
-
hasMacro
boolean hasMacro(java.lang.String name)
Whether the macro is declared- Parameters:
name- name of the macro being queried- Returns:
- whether the macro is declared
-
getMacro
Macro getMacro(java.lang.String name)
Tries to fetch the macro Before a macro is fetched it shold be checked whether it is declared throughhasMacro(String)- Parameters:
name-- Returns:
-
-