org.netbeans.modules.java.source 0.80.1 17

org.netbeans.api.java.source
Class ClasspathInfo

java.lang.Object
  extended by org.netbeans.api.java.source.ClasspathInfo

public final class ClasspathInfo
extends Object

Class which contains info about classpath


Nested Class Summary
static class ClasspathInfo.PathKind
           
 
Method Summary
 void addChangeListener(ChangeListener listener)
          Registers ChangeListener which will be notified about the changes in the classpath.
static ClasspathInfo create(ClassPath bootPath, ClassPath classPath, ClassPath sourcePath)
           
static ClasspathInfo create(Document doc)
          Creates a new instance of the ClasspathInfo for given Document.
static ClasspathInfo create(File file)
          Creates new interface to the compiler
static ClasspathInfo create(FileObject fo)
          Creates new interface to the compiler
 boolean equals(Object obj)
           
 ClassIndex getClassIndex()
           
 ClassPath getClassPath(ClasspathInfo.PathKind pathKind)
           
 int hashCode()
           
 void removeChangeListener(ChangeListener listener)
          Removes ChangeListener from the list of listeners.
 String toString()
           
 
Methods inherited from class java.lang.Object
clone, finalize, getClass, notify, notifyAll, wait, wait, wait
 

Method Detail

toString

public String toString()
Overrides:
toString in class Object

hashCode

public int hashCode()
Overrides:
hashCode in class Object

equals

public boolean equals(Object obj)
Overrides:
equals in class Object

create

@NullUnknown
public static ClasspathInfo create(@NonNull
                                               File file)
Creates new interface to the compiler

Parameters:
file - for which the CompilerInterface should be created
Returns:
ClasspathInfo or null if the file does not exist on the local file system or it has no classpath associated

create

@NullUnknown
public static ClasspathInfo create(@NonNull
                                               Document doc)
Creates a new instance of the ClasspathInfo for given Document.

It uses the Document.StreamDescriptionProperty to obtain the DataObject for the Document and creates a ClasspathInfo for the primary file of the DataObject

Parameters:
doc - a document for which the ClasspathInfo should be created
Returns:
a ClasspathInfo or null when the document source cannot be found.
Since:
0.42

create

@NonNull
public static ClasspathInfo create(@NonNull
                                           FileObject fo)
Creates new interface to the compiler

Parameters:
fo - for which the CompilerInterface should be created

create

@NonNull
public static ClasspathInfo create(@NonNull
                                           ClassPath bootPath,
                                           @NonNull
                                           ClassPath classPath,
                                           @NullAllowed
                                           ClassPath sourcePath)

addChangeListener

public void addChangeListener(@NonNull
                              ChangeListener listener)
Registers ChangeListener which will be notified about the changes in the classpath.

Parameters:
listener - The listener to register.

removeChangeListener

public void removeChangeListener(@NonNull
                                 ChangeListener listener)
Removes ChangeListener from the list of listeners.

Parameters:
listener - The listener to remove.

getClassPath

public ClassPath getClassPath(@NonNull
                              ClasspathInfo.PathKind pathKind)

getClassIndex

@NonNull
public ClassIndex getClassIndex()

org.netbeans.modules.java.source 0.80.1 17

Built on December 5 2011.  |  Portions Copyright 1997-2011 Sun Microsystems, Inc. All rights reserved.