public final class StringToCompilationUnitMap extends Object
File
's to collections of ICompilationUnit
's whose root
files are those files.Constructor and Description |
---|
StringToCompilationUnitMap()
Constructor.
|
Modifier and Type | Method and Description |
---|---|
void |
add(String[] files,
ICompilationUnit cu)
Adds entries for multiple file names all referenced from the same compilation unit.
|
void |
add(String sortKey,
ICompilationUnit cu)
Adds the specified
ICompilationUnit whose root source file
is the specified File to the map. |
Collection<WeakReference<ICompilationUnit>> |
get(String sortKey)
Gets a
Collection of ICompilationUnit 's that refer to
the specified file as their root source file. |
Collection<WeakReference<ICompilationUnit>> |
get(String sortKey,
ICompilerProject project)
Gets the a
Collection of ICompilationUnit 's that refer to
the specified file as their root source file for a specific project |
Collection<WeakReference<ICompilationUnit>> |
getInvisible(String sortKey)
Gets a
Collection of invisible ICompilationUnit 's that refer to
the specified file as their root source file. |
Collection<WeakReference<ICompilationUnit>> |
getInvisible(String sortKey,
ICompilerProject project)
Gets the a
Collection of invisible ICompilationUnit 's that refer to
the specified file as their root source file for a specific project |
Collection<WeakReference<ICompilationUnit>> |
getVisibleAndInvisible(String sortKey)
Gets a
Collection of visible and invisible ICompilationUnit 's that refer to
the specified file as their root source file. |
Collection<ICompilationUnit> |
remove(String sortKey,
ICompilationUnit cuToRemove)
Removes the specified CompilationUnit from the path to compilation unit map, removing
the path only when there are no compilation units remaining
|
public Collection<WeakReference<ICompilationUnit>> getInvisible(String sortKey)
Collection
of invisible ICompilationUnit
's that refer to
the specified file as their root source file.sortKey
- String to search the map for.ICompilationUnit
's that refer to
the specified file as their root source file.public Collection<WeakReference<ICompilationUnit>> getVisibleAndInvisible(String sortKey)
Collection
of visible and invisible ICompilationUnit
's that refer to
the specified file as their root source file.sortKey
- String to search the map for.ICompilationUnit
's that refer to
the specified file as their root source file.public Collection<WeakReference<ICompilationUnit>> get(String sortKey)
Collection
of ICompilationUnit
's that refer to
the specified file as their root source file.sortKey
- String to search the map for.ICompilationUnit
's that refer to
the specified file as their root source file.public Collection<WeakReference<ICompilationUnit>> get(String sortKey, ICompilerProject project)
Collection
of ICompilationUnit
's that refer to
the specified file as their root source file for a specific projectsortKey
- String to search the map for.project
- Project to search the map for.ICompilationUnit
's that refer to
the specified file as their root source file.public Collection<WeakReference<ICompilationUnit>> getInvisible(String sortKey, ICompilerProject project)
Collection
of invisible ICompilationUnit
's that refer to
the specified file as their root source file for a specific projectsortKey
- String to search the map for.project
- Project to search the map for.ICompilationUnit
's that refer to
the specified file as their root source file.public void add(String[] files, ICompilationUnit cu)
files
- An array of file paths.cu
- A compilation unit.public void add(String sortKey, ICompilationUnit cu)
ICompilationUnit
whose root source file
is the specified File to the map.sortKey
- String to add to the map.cu
- ICompilationUnit
to add to the map.public Collection<ICompilationUnit> remove(String sortKey, ICompilationUnit cuToRemove)
sortKey
- String to remove from the map.cuToRemove
- CU to remove from the map.ICompilationUnit
's that refer to
the specified file as their root source file. An empty collection
if no more CompilationUnits refer to this pathCopyright © 2016 The Apache Software Foundation. All rights reserved.