Package com.igormaznitsa.jcp.directives
Class IfDefDirectiveHandler
- java.lang.Object
-
- com.igormaznitsa.jcp.directives.AbstractDirectiveHandler
-
- com.igormaznitsa.jcp.directives.IfDefinedDirectiveHandler
-
- com.igormaznitsa.jcp.directives.IfDefDirectiveHandler
-
public class IfDefDirectiveHandler extends IfDefinedDirectiveHandler
The class implements short synonym for the //#ifdefined directive
-
-
Field Summary
-
Fields inherited from class com.igormaznitsa.jcp.directives.AbstractDirectiveHandler
DIRECTIVE_PREFIX, DIRECTIVES, GLOBAL_DIRECTIVES, ONE_LINE_COMMENT, PREFIX_FOR_KEEPING_LINES, PREFIX_FOR_KEEPING_LINES_PROCESSED_DIRECTIVES
-
-
Constructor Summary
Constructors Constructor Description IfDefDirectiveHandler()
-
Method Summary
All Methods Instance Methods Concrete Methods Modifier and Type Method Description booleanexecuteOnlyWhenExecutionAllowed()Shows that the directive can be executed only when the preprocessing n active state i.e.DirectiveArgumentTypegetArgumentType()Get the argument type needed by the directivejava.lang.StringgetName()Get the name of the directive without prefixjava.lang.StringgetReference()Get the directive reference, it will be printed for a help request-
Methods inherited from class com.igormaznitsa.jcp.directives.IfDefinedDirectiveHandler
execute, postprocessFlag
-
Methods inherited from class com.igormaznitsa.jcp.directives.AbstractDirectiveHandler
getFullName, isDeprecated, isGlobalPhaseAllowed, isPreprocessingPhaseAllowed
-
-
-
-
Method Detail
-
getName
public java.lang.String getName()
Description copied from class:AbstractDirectiveHandlerGet the name of the directive without prefix- Overrides:
getNamein classIfDefinedDirectiveHandler- Returns:
- the directive name, must not be null
-
getReference
public java.lang.String getReference()
Description copied from class:AbstractDirectiveHandlerGet the directive reference, it will be printed for a help request- Overrides:
getReferencein classIfDefinedDirectiveHandler- Returns:
- the directive reference as a String, must not be null
-
executeOnlyWhenExecutionAllowed
public boolean executeOnlyWhenExecutionAllowed()
Description copied from class:AbstractDirectiveHandlerShows that the directive can be executed only when the preprocessing n active state i.e. if it is in active block //#if..//#endif of //#while- Overrides:
executeOnlyWhenExecutionAllowedin classIfDefinedDirectiveHandler- Returns:
- true if the directive can be executed only if it is in active block, else the directive will be called in any case
-
getArgumentType
public DirectiveArgumentType getArgumentType()
Description copied from class:AbstractDirectiveHandlerGet the argument type needed by the directive- Overrides:
getArgumentTypein classIfDefinedDirectiveHandler- Returns:
- the argument type needed by the directive, it can't be null
-
-