sun.module.config
Class VisibilityPolicyFile

java.lang.Object
  extended by sun.module.config.VisibilityPolicyFile
All Implemented Interfaces:
VisibilityPolicy

public final class VisibilityPolicyFile
extends Object
implements VisibilityPolicy

This class represents a visibility policy file.

Since:
1.7
Author:
Stanley M. Ho

Method Summary
 boolean isVisible(ModuleDefinition moduleDef)
          Returns true if the module definition should be visible in the repository of the module system.
static VisibilityPolicy parse(URL url)
          Parses the visibility policy file from the url and returns a VisibilityPolicy object that represents the information in the visibility policy file.
 
Methods inherited from class java.lang.Object
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait
 

Method Detail

isVisible

public boolean isVisible(ModuleDefinition moduleDef)
Returns true if the module definition should be visible in the repository of the module system. Otherwise, returns false.

Specified by:
isVisible in interface VisibilityPolicy
Parameters:
moduleDef - the module definition.
Returns:
true if the module definition should be visible in the module system; false otherwise.

parse

public static VisibilityPolicy parse(URL url)
                              throws IOException
Parses the visibility policy file from the url and returns a VisibilityPolicy object that represents the information in the visibility policy file.

Parameters:
url - URL of visibility policy file
Returns:
VisibilityPolicy object that represents the information in the visibility policy file.
Throws:
IOException - if any I/O error occurs.