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 #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 |
|---|---|
|
Definitions(IFile definitionsSource) |
protected |
Definitions(IFile definitionsSource,
Map<String,String> definitions) |
| 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) |
String |
getValue(String def) |
int |
hashCode() |
boolean |
isDefined(String def) |
protected Map<String,String> |
loadEnvironmentDefinitions() |
protected Definitions |
loadParentDefinitions() |
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 loadParentDefinitions()
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 © 2020. All rights reserved.