public class Definitions extends Object
#define
and #undef
directives in the compiling source file. Parent definitions
correspond with the following:
build.properties
files in the source file's directory ancestry -Akey[=value]
javac command line option SymbolProvider
. See BuildVariantSymbols
.#define
and #undef
are limited to the file scope. This means #define
definitions are not available to other files. Similarly, parent definitions masked with #undef
are
not affected in other files.Modifier and Type | Field and Description |
---|---|
static String |
BUILD_PROPERTIES |
Modifier | Constructor and Description |
---|---|
protected |
Definitions(Definitions root,
IFile definitionsSource,
Map<String,String> definitions) |
|
Definitions(IFile definitionsSource) |
Modifier and Type | Method and Description |
---|---|
void |
clear() |
String |
define(String def)
Define
def in the source file's local definition space. |
String |
define(String def,
String value)
Define
def in the source file's local definition space with value . |
boolean |
equals(Object o) |
protected Definitions |
getParent() |
protected Definitions |
getRoot() |
protected IFile |
getSourceFile() |
String |
getValue(String def) |
int |
hashCode() |
boolean |
isDefined(String def) |
protected Map<String,String> |
loadEnvironmentDefinitions() |
protected Map<String,String> |
loadJavacDefinitions() |
protected Definitions |
loadParentDefinitions() |
protected Definitions |
makeBuildPropertiesDefinitions() |
String |
undef(String def)
Remove
def from the File's local definition space. |
public static final String BUILD_PROPERTIES
public Definitions(IFile definitionsSource)
protected Definitions(Definitions root, IFile definitionsSource, Map<String,String> definitions)
protected Definitions getRoot()
protected IFile getSourceFile()
protected Definitions getParent()
protected Definitions loadParentDefinitions()
protected Definitions makeBuildPropertiesDefinitions()
public void clear()
public boolean isDefined(String def)
def
, regardless of its value.public String define(String def, String value)
def
in the source file's local definition space with value
.public String undef(String def)
def
from the File's local definition space. Note if def
is defined in a parent scope
e.g., a properties file, it remains defined. In other words #undef
applies exclusively to the source
file scope.Copyright © 2024. All rights reserved.