public abstract class AbstractDirectiveHandler extends Object
Modifier and Type | Field and Description |
---|---|
static String |
DIRECTIVE_PREFIX
The common preprocessor prefix for all directives
|
static AbstractDirectiveHandler[] |
DIRECTIVES
The array contains all directives of the preprocessor
|
static AbstractDirectiveHandler[] |
GLOBAL_DIRECTIVES
The array contains preprocessor directives active only during the global
preprocessing phase
|
static String |
ONE_LINE_COMMENT
The prefix for one line comment
|
static String |
PREFIX_FOR_KEEPING_LINES
The prefix for lines to be kept by preprocessor
|
static String |
PREFIX_FOR_KEEPING_LINES_PROCESSED_DIRECTIVES
The prefix for lines to be kept by preprocessor, which contain processed
directives
|
Constructor and Description |
---|
AbstractDirectiveHandler() |
Modifier and Type | Method and Description |
---|---|
abstract AfterDirectiveProcessingBehaviour |
execute(String tailString,
PreprocessorContext context)
Execute directive
|
boolean |
executeOnlyWhenExecutionAllowed()
Shows that the directive can be executed only when the preprocessing n
active state i.e.
|
DirectiveArgumentType |
getArgumentType()
Get the argument type needed by the directive
|
String |
getFullName()
Get the directive name with prefix
|
abstract String |
getName()
Get the name of the directive without prefix
|
abstract String |
getReference()
Get the directive reference, it will be printed for a help request
|
boolean |
isDeprecated()
Check that the directive is deprecated one and can be removed in a next release
|
boolean |
isGlobalPhaseAllowed()
Shows that the directive can be executed during a global preprocessing
phase
|
boolean |
isPreprocessingPhaseAllowed()
Shows that the directive can be executed during the second preprocessing
phase
|
public static final String DIRECTIVE_PREFIX
public static final String PREFIX_FOR_KEEPING_LINES
public static final String PREFIX_FOR_KEEPING_LINES_PROCESSED_DIRECTIVES
public static final String ONE_LINE_COMMENT
public static final AbstractDirectiveHandler[] DIRECTIVES
public static final AbstractDirectiveHandler[] GLOBAL_DIRECTIVES
public abstract String getName()
public abstract String getReference()
public String getFullName()
public DirectiveArgumentType getArgumentType()
public abstract AfterDirectiveProcessingBehaviour execute(String tailString, PreprocessorContext context)
tailString
- the tail of the string where the directive has been met, must not be null but can be emptycontext
- the preprocessor contextpublic boolean executeOnlyWhenExecutionAllowed()
public boolean isGlobalPhaseAllowed()
public boolean isPreprocessingPhaseAllowed()
public boolean isDeprecated()
Copyright © 2011–2020 Igor Maznitsa. All rights reserved.