public class SystemGetPropertyHandler extends Object
System.getProperty(String) and related invocations.
The result of the method call is is assumed to be non-null if the argument is a literal key
that is guaranteed to be present in the system properties (according to the documentation of
System.getProperty(String)), as in System.getProperties("line.separator").
| Modifier and Type | Field and Description |
|---|---|
static Collection<String> |
predefinedSystemProperties
System properties that are defined at startup on every JVM.
|
| Constructor and Description |
|---|
SystemGetPropertyHandler(ProcessingEnvironment env,
NullnessAnnotatedTypeFactory factory,
boolean permitClearProperty)
Creates a SystemGetPropertyHandler.
|
| Modifier and Type | Method and Description |
|---|---|
void |
handle(MethodInvocationTree tree,
AnnotatedTypeMirror.AnnotatedExecutableType method)
Apply rules regarding System.getProperty and related methods.
|
public static final Collection<String> predefinedSystemProperties
This list is from the Javadoc of System.getProperties, for Java 11.
public SystemGetPropertyHandler(ProcessingEnvironment env, NullnessAnnotatedTypeFactory factory, boolean permitClearProperty)
env - the processing environmentfactory - the factory for constructing and looking up typespermitClearProperty - if true, client code may clear system properties, and this object
does nothingpublic void handle(MethodInvocationTree tree, AnnotatedTypeMirror.AnnotatedExecutableType method)
tree - a method invocationmethod - the method being invoked