|
|||||||||
PREV CLASS NEXT CLASS | FRAMES NO FRAMES | ||||||||
SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD |
java.lang.Objectcom.jogamp.common.util.PropertyAccess
public class PropertyAccess
Helper routines for accessing properties.
Field Summary | |
---|---|
static String |
javaws_prefix
trusted build-in property prefix 'javaws.' |
static String |
jnlp_prefix
trusted build-in property prefix 'jnlp.' |
Constructor Summary | |
---|---|
PropertyAccess()
|
Method Summary | |
---|---|
protected static void |
addTrustedPrefix(String prefix)
|
static boolean |
getBooleanProperty(String property,
boolean jnlpAlias)
|
static boolean |
getBooleanProperty(String property,
boolean jnlpAlias,
boolean defaultValue)
|
static int |
getIntProperty(String property,
boolean jnlpAlias,
int defaultValue)
|
static long |
getLongProperty(String property,
boolean jnlpAlias,
long defaultValue)
|
static String |
getProperty(String propertyKey,
boolean jnlpAlias)
Query the property with the name propertyKey . |
static String |
getProperty(String propertyKey,
boolean jnlpAlias,
String defaultValue)
See getProperty(String, boolean) , additionally allows a defaultValue if property value is null . |
static boolean |
isPropertyDefined(String property,
boolean jnlpAlias)
|
static boolean |
isTrusted(String propertyKey)
|
Methods inherited from class java.lang.Object |
---|
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait |
Field Detail |
---|
public static final String jnlp_prefix
public static final String javaws_prefix
Constructor Detail |
---|
public PropertyAccess()
Method Detail |
---|
protected static final void addTrustedPrefix(String prefix) throws AccessControlException
prefix
- New prefix to be registered as trusted.
AccessControlException
- as thrown by SecurityUtil.checkAllPermissions()
.public static final boolean isTrusted(String propertyKey)
public static final int getIntProperty(String property, boolean jnlpAlias, int defaultValue)
getProperty(String, boolean)
public static final long getLongProperty(String property, boolean jnlpAlias, long defaultValue)
getProperty(String, boolean)
public static final boolean getBooleanProperty(String property, boolean jnlpAlias)
getProperty(String, boolean)
public static final boolean getBooleanProperty(String property, boolean jnlpAlias, boolean defaultValue)
getProperty(String, boolean)
public static final boolean isPropertyDefined(String property, boolean jnlpAlias)
getProperty(String, boolean)
public static final String getProperty(String propertyKey, boolean jnlpAlias) throws SecurityException, NullPointerException, IllegalArgumentException
propertyKey
.
If jnlpAlias
is true
and the plain propertyKey
could not be resolved, an attempt to resolve the JNLP aliased trusted property is made.
Example: For the propertyName OneTwo
, the jnlp alias name is jnlp.OneTwo
, which is considered trusted.
propertyKey
- the property name to query.jnlpAlias
- true if a fallback attempt to query the JNLP aliased trusted property shall be made,
otherwise false.
NullPointerException
- if the property name is null
IllegalArgumentException
- if the property name is of length 0
SecurityException
- if access is not allowed to the given propertyKey
System.getProperty(String)
public static final String getProperty(String propertyKey, boolean jnlpAlias, String defaultValue) throws SecurityException, NullPointerException, IllegalArgumentException
getProperty(String, boolean)
, additionally allows a defaultValue
if property value is null
.
SecurityException
NullPointerException
IllegalArgumentException
|
|||||||||
PREV CLASS NEXT CLASS | FRAMES NO FRAMES | ||||||||
SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD |