io.sarl.apputils.uiextensions.classpath
Class JavaClasspathParser
final class JavaClasspathParser
extends java.lang.Object
Class mostly inspired from jdt See JavaProject#decodeClasspath and ClasspathEntry.
Maven Group Identifier:
io.sarl.apputils
Maven Artifact Identifier:
uiextensions
Since:
0.15
Action Summary
Modifier and type Action and description
static org.eclipse.jdt.core.IClasspathEntry decodeClasspath(String,IPath,String,Map<K,V>)
Reads and decode an XML classpath string.
static org.eclipse.jdt.core.IClasspathEntry elementDecode(Element,String,IPath,Map<K,V>)
Decodes one XML element with the XML stream.
static org.eclipse.jdt.core.IClasspathEntry readFileEntriesWithException(String,URL)
Reads entry of a .classpath file.
static org.eclipse.jdt.core.IClasspathEntry readFileEntriesWithException(String,URL,Map<K,V>)
Reads entry of a .classpath file.
Action Details
decodeClasspath(String,IPath,String,Map<K,V>)
def decodeClasspath(String,IPath,String,Map<K,V>) : org.eclipse.jdt.core.IClasspathEntry

throws java.io.IOException, org.eclipse.jdt.internal.core.ClasspathEntry.AssertionFailedException

Reads and decode an XML classpath string. Returns a two-dimensional array, where the number of elements in the row is fixed to 2. The first element is an array of raw classpath entries and the second element is an array of referenced entries that may have been stored by the client earlier. See getReferencedClasspathEntries() for more details.
Parameters:
projectName - - the name of project containing the .classpath file
projectRootAbsoluteFullPath - - the path to project containing the .classpath file
xmlClasspath - - path to the XML
unknownElements - - map of unknow elements
Returns:
the set of CLasspath ENtries extracted from the .classpath
Throws exception:
  • java.io.IOException: - exception during parsing of .classpath
  • : - exception during parsing of .classpath
elementDecode(Element,String,IPath,Map<K,V>)
def elementDecode(Element,String,IPath,Map<K,V>) : org.eclipse.jdt.core.IClasspathEntry
Decodes one XML element with the XML stream.
Parameters:
element - - the considered element
projectName - - the name of project containing the .classpath file
projectRootAbsoluteFullPath - - he path to project containing the .classpath file
unknownElements - - map of unknown elements
Returns:
the set of CLasspath ENtries extracted from the considered element
readFileEntriesWithException(String,URL)
def readFileEntriesWithException(String,URL) : org.eclipse.jdt.core.IClasspathEntry

throws org.eclipse.core.runtime.CoreException, java.io.IOException, org.eclipse.jdt.internal.core.ClasspathEntry.AssertionFailedException, java.net.URISyntaxException

Reads entry of a .classpath file.
Parameters:
projectName - - the name of project containing the .classpath file
projectRootAbsoluteFullPath - - the path to project containing the .classpath file
Returns:
the set of CLasspath ENtries extracted from the .classpath
Throws exception:
  • org.eclipse.core.runtime.CoreException: - exception during parsing of .classpath
  • java.io.IOException: - exception during parsing of .classpath
  • : - exception during parsing of .classpath
  • java.net.URISyntaxException: - exception during parsing of .classpath
readFileEntriesWithException(String,URL,Map<K,V>)
def readFileEntriesWithException(String,URL,Map<K,V>) : org.eclipse.jdt.core.IClasspathEntry

throws org.eclipse.core.runtime.CoreException, java.io.IOException, org.eclipse.jdt.internal.core.ClasspathEntry.AssertionFailedException, java.net.URISyntaxException

Reads entry of a .classpath file.
Parameters:
projectName - - the name of project containing the .classpath file
projectRootAbsoluteFullPath - - the path to project containing the .classpath file
unknownElements - - map of unknow elements
Returns:
the set of CLasspath Entries extracted from the .classpath
Throws exception:
  • org.eclipse.core.runtime.CoreException: - exception during parsing of .classpath
  • java.io.IOException: - exception during parsing of .classpath
  • : - exception during parsing of .classpath
  • java.net.URISyntaxException: - exception during parsing of .classpath