org.schmant.plugin.eclipse.java
Class ClasspathFileParserImpl

java.lang.Object
  extended by org.schmant.plugin.eclipse.java.ClasspathFileParserImpl
All Implemented Interfaces:
ClasspathFileParser

public class ClasspathFileParserImpl
extends Object
implements ClasspathFileParser

Default implementation of ClasspathFileParser.

This class has a static Set of the names of user libraries that are ignored if they occur in a project's .classpath file.

Since:
0.5
Author:
Karl Gustafsson
Task_package:
org.schmant.task.base

Constructor Summary
ClasspathFileParserImpl()
           
 
Method Summary
static void addIgnoredUserLibrary(String name)
          Add the name of one user library that should be ignored if it occurs in a project's .classpath file.
static Set<String> getIgnoredUserLibraries()
          Get the set of names of libraries that are ignored if they occur in a project's .classpath file.
 EclipseProjectClasspathInfo parse(ReadableFile f, EclipseWorkspace ewos, EntityRepository wosRoot, DirectoryView projRoot, EclipseWorkspaceSettings settings, EclipseWorkspaceConfiguration parsedSettings)
          Parse a .classpath file and return classpath information from it.
static void removeIgnoredUserLibrary(String name)
          Remove one name from the list of ignored libraries.
 
Methods inherited from class java.lang.Object
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait
 

Constructor Detail

ClasspathFileParserImpl

public ClasspathFileParserImpl()
Method Detail

addIgnoredUserLibrary

public static void addIgnoredUserLibrary(String name)
Add the name of one user library that should be ignored if it occurs in a project's .classpath file.

Parameters:
name - The name of the library to ignore.

getIgnoredUserLibraries

public static Set<String> getIgnoredUserLibraries()
Get the set of names of libraries that are ignored if they occur in a project's .classpath file.

Returns:
The set of ignored names.

removeIgnoredUserLibrary

public static void removeIgnoredUserLibrary(String name)
Remove one name from the list of ignored libraries.

Parameters:
name - The name to remove.

parse

public EclipseProjectClasspathInfo parse(ReadableFile f,
                                         EclipseWorkspace ewos,
                                         EntityRepository wosRoot,
                                         DirectoryView projRoot,
                                         EclipseWorkspaceSettings settings,
                                         EclipseWorkspaceConfiguration parsedSettings)
                                  throws IOException
Description copied from interface: ClasspathFileParser
Parse a .classpath file and return classpath information from it.

Specified by:
parse in interface ClasspathFileParser
Parameters:
f - The classpath file.
ewos - The Eclipse workspace. No methods may be called on this object since it is not fully initialized yet. See EclipseWorkspaceInfoCollector.collect(EclipseWorkspace).
wosRoot - The workspace's root directory.
projRoot - The project's directory.
settings - Eclipse workspace settings. May be null.
parsedSettings - Eclipse workspace settings parsed from the workspace metadata. User-supplied settings in the settings object (if any) should override these settings.
Returns:
Classpath information.
Throws:
IOException - On I/O errors.