com.sun.jini.tool.envcheck.plugins
Class CheckJSKPlatform

java.lang.Object
  extended by com.sun.jini.tool.envcheck.AbstractPlugin
      extended by com.sun.jini.tool.envcheck.plugins.CheckJSKPlatform
All Implemented Interfaces:
Plugin

public class CheckJSKPlatform
extends AbstractPlugin

Check whether jsk-platform.jar is in the classpath of the command-line being analyzed, and if the activation group if there is one.


Field Summary
private  EnvCheck envCheck
          the plugin container
private  HashSet seen
          classpath components already seen, to avoid circular reference loops
 
Constructor Summary
CheckJSKPlatform()
           
 
Method Summary
private  ArrayList checkItem(String item, String source)
          Checks a component on the classpath for existence and accessibility.
private  void checkPlatform(String classpath, String source)
          Check classpath for the existence of jsk-platform.jar.
private  String[] parseClasspath(String path, String source)
          Separate each of the components making up the classpath into separate tokens.
 void run(EnvCheck envCheck)
          Check the command line vm and the group, if there is one, for a classpath containing jsk-platform.jar.
 
Methods inherited from class com.sun.jini.tool.envcheck.AbstractPlugin
getBundle, getString, getString, getString, getString, handleUnexpectedSubtaskReturn, isPluginOption, taskName
 
Methods inherited from class java.lang.Object
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait
 

Field Detail

envCheck

private EnvCheck envCheck
the plugin container


seen

private HashSet seen
classpath components already seen, to avoid circular reference loops

Constructor Detail

CheckJSKPlatform

public CheckJSKPlatform()
Method Detail

run

public void run(EnvCheck envCheck)
Check the command line vm and the group, if there is one, for a classpath containing jsk-platform.jar.

Parameters:
envCheck - the plugin container

checkPlatform

private void checkPlatform(String classpath,
                           String source)
Check classpath for the existence of jsk-platform.jar.

Parameters:
classpath - the classpath to check
source - the source description

parseClasspath

private String[] parseClasspath(String path,
                                String source)
Separate each of the components making up the classpath into separate tokens. For tokens which resolve to jar files, recursively include their Class-Path manifest entries if defined. Verify each component for existence and accessibility.


checkItem

private ArrayList checkItem(String item,
                            String source)
Checks a component on the classpath for existence and accessibility. If the item meets these criteria, it is placed in a list which is returned to the caller. If the item is a JAR file whose manifest which contains a Class-Path manifest entry, then each of those items are checked and conditionally added to the list as well (recursively). If an item has been seen previously, and empty list is returned immediately.

Parameters:
item - the classpath component to verify
source - the source descriptive text
Returns:
the list containing this item and all items referred to by this item.


Copyright 2007-2010, multiple authors.
Licensed under the Apache License, Version 2.0, see the NOTICE file for attributions.