Package aQute.bnd.osgi.eclipse
Class EclipseClasspath
- java.lang.Object
-
- aQute.bnd.osgi.eclipse.EclipseClasspath
-
public class EclipseClasspath extends java.lang.Object
Parse the Eclipse project information for the classpath. Unfortunately, it is impossible to read the variables. They are ignored but that can cause problems. @version $Revision: 1.2 $
-
-
Field Summary
Fields Modifier and Type Field Description (package private) java.util.Set<java.io.File>
allSources
(package private) java.util.Set<java.io.File>
bootclasspath
(package private) java.util.Set<java.io.File>
classpath
(package private) javax.xml.parsers.DocumentBuilder
db
(package private) java.util.List<java.io.File>
dependents
static int
DO_VARIABLES
(package private) static javax.xml.parsers.DocumentBuilderFactory
documentBuilderFactory
(package private) java.util.Set<java.io.File>
exports
(package private) int
options
(package private) java.io.File
output
(package private) static java.util.regex.Pattern
PATH
(package private) java.io.File
project
(package private) java.util.Map<java.lang.String,java.lang.String>
properties
(package private) boolean
recurse
(package private) Reporter
reporter
(package private) java.util.Set<java.io.File>
sources
(package private) java.io.File
workspace
-
Constructor Summary
Constructors Constructor Description EclipseClasspath(Reporter reporter, java.io.File workspace, java.io.File project)
EclipseClasspath(Reporter reporter, java.io.File workspace, java.io.File project, int options)
Parse an Eclipse project structure to discover the classpath.
-
Method Summary
All Methods Instance Methods Concrete Methods Modifier and Type Method Description private java.lang.String
get(org.w3c.dom.NamedNodeMap map, java.lang.String name)
java.util.Set<java.io.File>
getAllSources()
java.util.Set<java.io.File>
getBootclasspath()
java.util.Set<java.io.File>
getClasspath()
java.util.List<java.io.File>
getDependents()
java.util.Set<java.io.File>
getExports()
private java.io.File
getFile(java.io.File abs, java.io.File relative, java.lang.String opath)
java.io.File
getOutput()
java.util.Set<java.io.File>
getSourcepath()
(package private) void
parse(java.io.File project, boolean top)
Recursive routine to parse the files.private java.io.File
replaceVar(java.lang.String path)
void
setProperties(java.util.Map<java.lang.String,java.lang.String> map)
void
setRecurse(boolean recurse)
-
-
-
Field Detail
-
documentBuilderFactory
static javax.xml.parsers.DocumentBuilderFactory documentBuilderFactory
-
db
javax.xml.parsers.DocumentBuilder db
-
project
java.io.File project
-
workspace
java.io.File workspace
-
sources
java.util.Set<java.io.File> sources
-
allSources
java.util.Set<java.io.File> allSources
-
classpath
java.util.Set<java.io.File> classpath
-
dependents
java.util.List<java.io.File> dependents
-
output
java.io.File output
-
recurse
boolean recurse
-
exports
java.util.Set<java.io.File> exports
-
properties
java.util.Map<java.lang.String,java.lang.String> properties
-
reporter
Reporter reporter
-
options
int options
-
bootclasspath
java.util.Set<java.io.File> bootclasspath
-
DO_VARIABLES
public static final int DO_VARIABLES
- See Also:
- Constant Field Values
-
PATH
static java.util.regex.Pattern PATH
-
-
Constructor Detail
-
EclipseClasspath
public EclipseClasspath(Reporter reporter, java.io.File workspace, java.io.File project, int options) throws java.lang.Exception
Parse an Eclipse project structure to discover the classpath.- Parameters:
workspace
- Points to workspaceproject
- Points to project- Throws:
javax.xml.parsers.ParserConfigurationException
org.xml.sax.SAXException
java.io.IOException
java.lang.Exception
-
EclipseClasspath
public EclipseClasspath(Reporter reporter, java.io.File workspace, java.io.File project) throws java.lang.Exception
- Throws:
java.lang.Exception
-
-
Method Detail
-
parse
void parse(java.io.File project, boolean top) throws javax.xml.parsers.ParserConfigurationException, org.xml.sax.SAXException, java.io.IOException
Recursive routine to parse the files. If a sub project is detected, it is parsed before the parsing continues. This should give the right order.- Parameters:
project
- Project directorytop
- If this is the top project- Throws:
javax.xml.parsers.ParserConfigurationException
org.xml.sax.SAXException
java.io.IOException
-
getFile
private java.io.File getFile(java.io.File abs, java.io.File relative, java.lang.String opath)
-
replaceVar
private java.io.File replaceVar(java.lang.String path)
-
get
private java.lang.String get(org.w3c.dom.NamedNodeMap map, java.lang.String name)
-
getClasspath
public java.util.Set<java.io.File> getClasspath()
-
getSourcepath
public java.util.Set<java.io.File> getSourcepath()
-
getOutput
public java.io.File getOutput()
-
getDependents
public java.util.List<java.io.File> getDependents()
-
setRecurse
public void setRecurse(boolean recurse)
-
getExports
public java.util.Set<java.io.File> getExports()
-
setProperties
public void setProperties(java.util.Map<java.lang.String,java.lang.String> map)
-
getBootclasspath
public java.util.Set<java.io.File> getBootclasspath()
-
getAllSources
public java.util.Set<java.io.File> getAllSources()
-
-