|
||||||||||
PREV CLASS NEXT CLASS | FRAMES NO FRAMES | |||||||||
SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD |
java.lang.Object sun.module.config.DefaultVisibilityPolicy
public class DefaultVisibilityPolicy
This class represents a default implementation for
java.module.VisibilityPolicy
.
This object stores the policy for entire Java runtime, and is the amalgamation of multiple visiblity policies that resides in files. The algorithm for locating the policy file(s) and reading their information is:
sun.module.config.ModuleSystemConfig
properties,
visibility.policy.url.1,
visibility.policy.url.2, ...,
visibility.policy.X". These properties are set
in the module system properties file, which is located in the file named
<JAVA_HOME>/lib/module/module.properties.
<JAVA_HOME> refers to the value of the java.home system property,
and specifies the directory where the JRE is installed.
Each property value specifies a URL
pointing to a
policy file to be loaded. Read in and load each policy.
java.lang.System
property java.module.visibility.policy
may also be set to a URL
pointing to another policy file
(which is the case when a user uses the -D switch at runtime).
If this property is defined, and its use is allowed by the
module system property file (the Module System property,
visibility.policy.allowSystemProperty is set to true),
also load that policy.
If the java.module.visibility.policy property is defined using
"==" (rather than "="), then ignore all other specified
policies and only load this policy.
VisibilityPolicy
Constructor Summary | |
---|---|
DefaultVisibilityPolicy()
Initializes the DefaultVisibilityPolicy object and reads the default visibility policies. |
Method Summary | |
---|---|
boolean |
isVisible(ModuleDefinition moduleDef)
Returns true if the module definition should be visible in the repository of the module system. |
boolean |
refresh()
Refreshes the DefaultVisibilityPolicy object and loads the visibility policy configuration file(s). |
Methods inherited from class java.lang.Object |
---|
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait |
Constructor Detail |
---|
public DefaultVisibilityPolicy()
Method Detail |
---|
public boolean refresh()
loop through the Module System Properties named "visibility.policy.url.1", "visibility.policy.url.2", etc, until no more is found. Each of these specify a visibility policy file. if the system property "java.module.visibility.policy" is defined (which is the case when the user uses the -D switch at runtime), and its use is allowed by the module system property file, also load it.
public boolean isVisible(ModuleDefinition moduleDef)
isVisible
in interface VisibilityPolicy
moduleDef
- the module definition.
|
||||||||||
PREV CLASS NEXT CLASS | FRAMES NO FRAMES | |||||||||
SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD |