public class Definitions
extends java.lang.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 java.lang.String |
BUILD_PROPERTIES |
| Modifier | Constructor and Description |
|---|---|
protected |
Definitions(Definitions root,
IFile definitionsSource,
java.util.Map<java.lang.String,java.lang.String> definitions) |
|
Definitions(IFile definitionsSource) |
| Modifier and Type | Method and Description |
|---|---|
void |
clear() |
java.lang.String |
define(java.lang.String def)
Define
def in the source file's local definition space. |
java.lang.String |
define(java.lang.String def,
java.lang.String value)
Define
def in the source file's local definition space with value. |
boolean |
equals(java.lang.Object o) |
protected Definitions |
getParent() |
protected Definitions |
getRoot() |
protected IFile |
getSourceFile() |
java.lang.String |
getValue(java.lang.String def) |
int |
hashCode() |
boolean |
isDefined(java.lang.String def) |
protected java.util.Map<java.lang.String,java.lang.String> |
loadEnvironmentDefinitions() |
protected Definitions |
loadParentDefinitions() |
java.lang.String |
undef(java.lang.String def)
Remove
def from the File's local definition space. |
public static final java.lang.String BUILD_PROPERTIES
public Definitions(IFile definitionsSource)
protected Definitions(Definitions root, IFile definitionsSource, java.util.Map<java.lang.String,java.lang.String> definitions)
protected Definitions getRoot()
protected IFile getSourceFile()
protected Definitions getParent()
protected Definitions loadParentDefinitions()
protected java.util.Map<java.lang.String,java.lang.String> loadEnvironmentDefinitions()
public void clear()
public boolean isDefined(java.lang.String def)
def, regardless of its value.public java.lang.String getValue(java.lang.String def)
public java.lang.String define(java.lang.String def)
def in the source file's local definition space.public java.lang.String define(java.lang.String def,
java.lang.String value)
def in the source file's local definition space with value.public java.lang.String undef(java.lang.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.public boolean equals(java.lang.Object o)
equals in class java.lang.Objectpublic int hashCode()
hashCode in class java.lang.ObjectCopyright © 2024. All rights reserved.