| java.lang.Object org.eclipse.jdt.internal.core.util.ReferenceInfoAdapter org.eclipse.jdt.internal.core.SourceMapper
Constructor Summary | |
public | SourceMapper() | public | SourceMapper(IPath sourcePath, String rootPath, Map options) Creates a SourceMapper that locates source in the zip file
at the given location in the specified package fragment root. |
Method Summary | |
public void | acceptImport(int declarationStart, int declarationEnd, char[][] tokens, boolean onDemand, int modifiers) | public void | acceptLineSeparatorPositions(int[] positions) | public void | acceptPackage(int declarationStart, int declarationEnd, char[] name) | public void | acceptProblem(CategorizedProblem problem) | public void | close() Closes this SourceMapper 's zip file. | public void | enterCompilationUnit() | public void | enterConstructor(MethodInfo methodInfo) | public void | enterField(FieldInfo fieldInfo) | public void | enterInitializer(int declarationSourceStart, int modifiers) | public void | enterMethod(MethodInfo methodInfo) | public void | enterType(TypeInfo typeInfo) | public void | exitCompilationUnit(int declarationEnd) | public void | exitConstructor(int declarationEnd) | public void | exitField(int initializationStart, int declarationEnd, int declarationSourceEnd) | public void | exitInitializer(int declarationEnd) | public void | exitMethod(int declarationEnd, int defaultValueStart, int defaultValueEnd) | public void | exitType(int declarationEnd) | public char[] | findSource(IType type, IBinaryType info) Locates and returns source code for the given (binary) type, in this
SourceMapper's ZIP file, or returns null if source
code cannot be found. | public char[] | findSource(IType type, String simpleSourceFileName) Locates and returns source code for the given (binary) type, in this
SourceMapper's ZIP file, or returns null if source
code cannot be found.
The given simpleSourceFileName is the .java file name (without the enclosing
folder) used to create the given type (e.g. | public char[] | findSource(String fullName) | public char[][] | getImports(BinaryType type) | public char[][] | getMethodParameterNames(IMethod method) Returns parameters names for the given method, or
null if no parameter names are known for the method. | public SourceRange | getNameRange(IJavaElement element) Returns the SourceRange for the name of the given element, or
{-1, -1} if no source range is known for the name of the element. | public SourceRange | getSourceRange(IJavaElement element) Returns the SourceRange for the given element, or
{-1, -1} if no source range is known for the element. | protected IType | getType(String typeName) Returns the type with the given typeName . | protected IJavaElement[] | getUnqualifiedMethodHandle(IMethod method, boolean noDollar) Creates a handle that has parameter types that are not
fully qualified so that the correct source is found. | public void | mapSource(IType type, char[] contents, IBinaryType info) Maps the given source code to the given binary type and its children. | public synchronized ISourceRange | mapSource(IType type, char[] contents, IBinaryType info, IJavaElement elementToFind) Maps the given source code to the given binary type and its children. | protected void | setMethodParameterNames(IMethod method, char[][] parameterNames) Sets the mapping for this method to its parameter names. | protected void | setSourceRange(IJavaElement element, SourceRange sourceRange, SourceRange nameRange) Sets the mapping for this element to its source ranges for its source range
and name range. |
UNKNOWN_RANGE | final public static SourceRange UNKNOWN_RANGE(Code) | | The unknown source range {-1, 0}
|
VERBOSE | public static boolean VERBOSE(Code) | | |
anonymousClassName | int anonymousClassName(Code) | | |
anonymousCounter | int anonymousCounter(Code) | | Anonymous counter in case we want to map the source of an anonymous class.
|
binaryType | protected BinaryType binaryType(Code) | | The binary type source is being mapped for
|
memberDeclarationStart | protected int[] memberDeclarationStart(Code) | | The position within the source of the start of the
current member element, or -1 if we are outside a member.
|
memberName | protected String[] memberName(Code) | | The name of the current member element.
|
memberNameRange | protected SourceRange[] memberNameRange(Code) | | The SourceRange of the name of the current member element.
|
methodParameterNames | protected char[][][] methodParameterNames(Code) | | The parameter names for the current member method element.
|
methodParameterTypes | protected char[][][] methodParameterTypes(Code) | | The parameter types for the current member method element.
|
parameterNames | protected HashMap parameterNames(Code) | | Table that maps a binary method to its parameter names.
Keys are the method handles, entries are char[][] .
|
rootPath | protected String rootPath(Code) | | Specifies the location of the package fragment root within
the zip (empty specifies the default root). null is
not a valid root path.
|
rootPaths | protected ArrayList rootPaths(Code) | | Specifies the location of the package fragment roots within
the zip (empty specifies the default root). null is
not a valid root path.
|
sourcePath | protected IPath sourcePath(Code) | | The location of the zip file containing source.
|
sourceRanges | protected HashMap sourceRanges(Code) | | Table that maps a binary element to its SourceRange s.
Keys are the element handles, entries are SourceRange[] which
is a two element array; the first being source range, the second
being name range.
|
typeDeclarationStarts | int[] typeDeclarationStarts(Code) | | |
typeModifiers | int[] typeModifiers(Code) | | |
SourceMapper | public SourceMapper()(Code) | | |
SourceMapper | public SourceMapper(IPath sourcePath, String rootPath, Map options)(Code) | | Creates a SourceMapper that locates source in the zip file
at the given location in the specified package fragment root.
|
acceptImport | public void acceptImport(int declarationStart, int declarationEnd, char[][] tokens, boolean onDemand, int modifiers)(Code) | | See Also: ISourceElementRequestor |
close | public void close()(Code) | | Closes this SourceMapper 's zip file. Once this is done, this
SourceMapper cannot be used again.
|
findSource | public char[] findSource(IType type, IBinaryType info)(Code) | | Locates and returns source code for the given (binary) type, in this
SourceMapper's ZIP file, or returns null if source
code cannot be found.
|
findSource | public char[] findSource(IType type, String simpleSourceFileName)(Code) | | Locates and returns source code for the given (binary) type, in this
SourceMapper's ZIP file, or returns null if source
code cannot be found.
The given simpleSourceFileName is the .java file name (without the enclosing
folder) used to create the given type (e.g. "A.java" for x/y/A$Inner.class)
|
getImports | public char[][] getImports(BinaryType type)(Code) | | Return a char[][] array containing the imports of the attached source for the binary type
|
getMethodParameterNames | public char[][] getMethodParameterNames(IMethod method)(Code) | | Returns parameters names for the given method, or
null if no parameter names are known for the method.
|
getNameRange | public SourceRange getNameRange(IJavaElement element)(Code) | | Returns the SourceRange for the name of the given element, or
{-1, -1} if no source range is known for the name of the element.
|
getSourceRange | public SourceRange getSourceRange(IJavaElement element)(Code) | | Returns the SourceRange for the given element, or
{-1, -1} if no source range is known for the element.
|
getType | protected IType getType(String typeName)(Code) | | Returns the type with the given typeName . Returns inner classes
as well.
|
getUnqualifiedMethodHandle | protected IJavaElement[] getUnqualifiedMethodHandle(IMethod method, boolean noDollar)(Code) | | Creates a handle that has parameter types that are not
fully qualified so that the correct source is found.
|
mapSource | public void mapSource(IType type, char[] contents, IBinaryType info)(Code) | | Maps the given source code to the given binary type and its children.
|
mapSource | public synchronized ISourceRange mapSource(IType type, char[] contents, IBinaryType info, IJavaElement elementToFind)(Code) | | Maps the given source code to the given binary type and its children.
If a non-null java element is passed, finds the name range for the
given java element without storing it.
|
setMethodParameterNames | protected void setMethodParameterNames(IMethod method, char[][] parameterNames)(Code) | | Sets the mapping for this method to its parameter names.
See Also: SourceMapper.parameterNames |
Methods inherited from org.eclipse.jdt.internal.core.util.ReferenceInfoAdapter | public void acceptConstructorReference(char[] typeName, int argCount, int sourcePosition)(Code)(Java Doc) public void acceptFieldReference(char[] fieldName, int sourcePosition)(Code)(Java Doc) public void acceptMethodReference(char[] methodName, int argCount, int sourcePosition)(Code)(Java Doc) public void acceptTypeReference(char[][] typeName, int sourceStart, int sourceEnd)(Code)(Java Doc) public void acceptTypeReference(char[] typeName, int sourcePosition)(Code)(Java Doc) public void acceptUnknownReference(char[][] name, int sourceStart, int sourceEnd)(Code)(Java Doc) public void acceptUnknownReference(char[] name, int sourcePosition)(Code)(Java Doc)
|
|
|