Package com.igormaznitsa.jcp.directives
Class ExcludeIfDirectiveHandler
java.lang.Object
com.igormaznitsa.jcp.directives.AbstractDirectiveHandler
com.igormaznitsa.jcp.directives.ExcludeIfDirectiveHandler
The class implements the //#excludeif directive handler
-
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 -
Method Summary
Modifier and TypeMethodDescriptionexecute
(String string, PreprocessorContext context) Execute directiveGet the argument type needed by the directivegetName()
Get the name of the directive without prefixGet the directive reference, it will be printed for a help requestboolean
Shows that the directive can be executed during a global preprocessing phaseboolean
Shows that the directive can be executed during the second preprocessing phaseMethods inherited from class com.igormaznitsa.jcp.directives.AbstractDirectiveHandler
executeOnlyWhenExecutionAllowed, getFullName, isDeprecated
-
Constructor Details
-
ExcludeIfDirectiveHandler
public ExcludeIfDirectiveHandler()
-
-
Method Details
-
getName
Description copied from class:AbstractDirectiveHandler
Get the name of the directive without prefix- Specified by:
getName
in classAbstractDirectiveHandler
- Returns:
- the directive name, must not be null
-
getReference
Description copied from class:AbstractDirectiveHandler
Get the directive reference, it will be printed for a help request- Specified by:
getReference
in classAbstractDirectiveHandler
- Returns:
- the directive reference as a String, must not be null
-
isGlobalPhaseAllowed
public boolean isGlobalPhaseAllowed()Description copied from class:AbstractDirectiveHandler
Shows that the directive can be executed during a global preprocessing phase- Overrides:
isGlobalPhaseAllowed
in classAbstractDirectiveHandler
- Returns:
- true if the directive allows the global directive phase, false if the directive must be ignored during that phase
-
isPreprocessingPhaseAllowed
public boolean isPreprocessingPhaseAllowed()Description copied from class:AbstractDirectiveHandler
Shows that the directive can be executed during the second preprocessing phase- Overrides:
isPreprocessingPhaseAllowed
in classAbstractDirectiveHandler
- Returns:
- true uf the directive can be executed during the second preprocessing phase else false if the directive must be ignored
-
getArgumentType
Description copied from class:AbstractDirectiveHandler
Get the argument type needed by the directive- Overrides:
getArgumentType
in classAbstractDirectiveHandler
- Returns:
- the argument type needed by the directive, it can't be null
-
execute
Description copied from class:AbstractDirectiveHandler
Execute directive- Specified by:
execute
in classAbstractDirectiveHandler
- Parameters:
string
- the tail of the string where the directive has been met, must not be null but can be emptycontext
- the preprocessor context- Returns:
- the needed preprocessor behavior, must not be null
-