Class SystemGetPropertyHandler
- java.lang.Object
-
- org.checkerframework.checker.nullness.SystemGetPropertyHandler
-
public class SystemGetPropertyHandler extends java.lang.ObjectUtility class for handlingSystem.getProperty(String)and related invocations.The result of the method call 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 inSystem.getProperties("line.separator").
-
-
Field Summary
Fields Modifier and Type Field Description static java.util.Collection<java.lang.String>predefinedSystemPropertiesSystem properties that are defined at startup on every JVM.
-
Constructor Summary
Constructors Constructor Description SystemGetPropertyHandler(javax.annotation.processing.ProcessingEnvironment env, NullnessNoInitAnnotatedTypeFactory factory, boolean permitClearProperty)Creates a SystemGetPropertyHandler.
-
Method Summary
All Methods Instance Methods Concrete Methods Modifier and Type Method Description voidhandle(com.sun.source.tree.MethodInvocationTree tree, AnnotatedTypeMirror.AnnotatedExecutableType method)Apply rules regarding System.getProperty and related methods.
-
-
-
Constructor Detail
-
SystemGetPropertyHandler
public SystemGetPropertyHandler(javax.annotation.processing.ProcessingEnvironment env, NullnessNoInitAnnotatedTypeFactory factory, boolean permitClearProperty)Creates a SystemGetPropertyHandler.- Parameters:
env- the processing environmentfactory- the factory for constructing and looking up typespermitClearProperty- if true, client code may clear system properties, and this object does nothing
-
-
Method Detail
-
handle
public void handle(com.sun.source.tree.MethodInvocationTree tree, AnnotatedTypeMirror.AnnotatedExecutableType method)Apply rules regarding System.getProperty and related methods.- Parameters:
tree- a method invocationmethod- the method being invoked
-
-