Java Doc for SourceMapper.java in  » IDE-Eclipse » jdt » org » eclipse » jdt » internal » core » Java Source Code / Java DocumentationJava Source Code and Java Documentation

Java Source Code / Java Documentation
1. 6.0 JDK Core
2. 6.0 JDK Modules
3. 6.0 JDK Modules com.sun
4. 6.0 JDK Modules com.sun.java
5. 6.0 JDK Modules sun
6. 6.0 JDK Platform
7. Ajax
8. Apache Harmony Java SE
9. Aspect oriented
10. Authentication Authorization
11. Blogger System
12. Build
13. Byte Code
14. Cache
15. Chart
16. Chat
17. Code Analyzer
18. Collaboration
19. Content Management System
20. Database Client
21. Database DBMS
22. Database JDBC Connection Pool
23. Database ORM
24. Development
25. EJB Server geronimo
26. EJB Server GlassFish
27. EJB Server JBoss 4.2.1
28. EJB Server resin 3.1.5
29. ERP CRM Financial
30. ESB
31. Forum
32. GIS
33. Graphic Library
34. Groupware
35. HTML Parser
36. IDE
37. IDE Eclipse
38. IDE Netbeans
39. Installer
40. Internationalization Localization
41. Inversion of Control
42. Issue Tracking
43. J2EE
44. JBoss
45. JMS
46. JMX
47. Library
48. Mail Clients
49. Net
50. Parser
51. PDF
52. Portal
53. Profiler
54. Project Management
55. Report
56. RSS RDF
57. Rule Engine
58. Science
59. Scripting
60. Search Engine
61. Security
62. Sevlet Container
63. Source Control
64. Swing Library
65. Template Engine
66. Test Coverage
67. Testing
68. UML
69. Web Crawler
70. Web Framework
71. Web Mail
72. Web Server
73. Web Services
74. Web Services apache cxf 2.0.1
75. Web Services AXIS2
76. Wiki Engine
77. Workflow Engines
78. XML
79. XML UI
Java
Java Tutorial
Java Open Source
Jar File Download
Java Articles
Java Products
Java by API
Photoshop Tutorials
Maya Tutorials
Flash Tutorials
3ds-Max Tutorials
Illustrator Tutorials
GIMP Tutorials
C# / C Sharp
C# / CSharp Tutorial
C# / CSharp Open Source
ASP.Net
ASP.NET Tutorial
JavaScript DHTML
JavaScript Tutorial
JavaScript Reference
HTML / CSS
HTML CSS Reference
C / ANSI-C
C Tutorial
C++
C++ Tutorial
Ruby
PHP
Python
Python Tutorial
Python Open Source
SQL Server / T-SQL
SQL Server / T-SQL Tutorial
Oracle PL / SQL
Oracle PL/SQL Tutorial
PostgreSQL
SQL / MySQL
MySQL Tutorial
VB.Net
VB.Net Tutorial
Flash / Flex / ActionScript
VBA / Excel / Access / Word
XML
XML Tutorial
Microsoft Office PowerPoint 2007 Tutorial
Microsoft Office Excel 2007 Tutorial
Microsoft Office Word 2007 Tutorial
Java Source Code / Java Documentation » IDE Eclipse » jdt » org.eclipse.jdt.internal.core 
Source Cross Reference  Class Diagram Java Document (Java Doc) 


java.lang.Object
   org.eclipse.jdt.internal.core.util.ReferenceInfoAdapter
      org.eclipse.jdt.internal.core.SourceMapper

SourceMapper
public class SourceMapper extends ReferenceInfoAdapter implements ISourceElementRequestor,SuffixConstants(Code)
A SourceMapper maps source code in a ZIP file to binary types in a JAR. The SourceMapper uses the fuzzy parser to identify source fragments in a .java file, and attempts to match the source code with children in a binary type. A SourceMapper is associated with a JarPackageFragment by an AttachSourceOperation.
See Also:   org.eclipse.jdt.internal.core.JarPackageFragment


Field Summary
final public static  SourceRangeUNKNOWN_RANGE
    
public static  booleanVERBOSE
    
 intanonymousClassName
    
 intanonymousCounter
     Anonymous counter in case we want to map the source of an anonymous class.
protected  BinaryTypebinaryType
    
protected  HashMapcategories
    
 Stringencoding
    
protected  int[]memberDeclarationStart
     The position within the source of the start of the current member element, or -1 if we are outside a member.
protected  String[]memberName
     The name of the current member element.
protected  SourceRange[]memberNameRange
     The SourceRange of the name of the current member element.
protected  char[][][]methodParameterNames
     The parameter names for the current member method element.
protected  char[][][]methodParameterTypes
     The parameter types for the current member method element.
 Mapoptions
    
protected  HashMapparameterNames
     Table that maps a binary method to its parameter names.
protected  StringrootPath
     Specifies the location of the package fragment root within the zip (empty specifies the default root).
protected  ArrayListrootPaths
     Specifies the location of the package fragment roots within the zip (empty specifies the default root).
protected  IJavaElementsearchedElement
    
protected  IPathsourcePath
     The location of the zip file containing source.
protected  HashMapsourceRanges
     Table that maps a binary element to its SourceRanges.
 int[]typeDeclarationStarts
    
 inttypeDepth
    
 int[]typeModifiers
    
 SourceRange[]typeNameRanges
    
 IType[]types
    

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  voidacceptImport(int declarationStart, int declarationEnd, char[][] tokens, boolean onDemand, int modifiers)
    
public  voidacceptLineSeparatorPositions(int[] positions)
    
public  voidacceptPackage(int declarationStart, int declarationEnd, char[] name)
    
public  voidacceptProblem(CategorizedProblem problem)
    
public  voidclose()
     Closes this SourceMapper's zip file.
public  voidenterCompilationUnit()
    
public  voidenterConstructor(MethodInfo methodInfo)
    
public  voidenterField(FieldInfo fieldInfo)
    
public  voidenterInitializer(int declarationSourceStart, int modifiers)
    
public  voidenterMethod(MethodInfo methodInfo)
    
public  voidenterType(TypeInfo typeInfo)
    
public  voidexitCompilationUnit(int declarationEnd)
    
public  voidexitConstructor(int declarationEnd)
    
public  voidexitField(int initializationStart, int declarationEnd, int declarationSourceEnd)
    
public  voidexitInitializer(int declarationEnd)
    
public  voidexitMethod(int declarationEnd, int defaultValueStart, int defaultValueEnd)
    
public  voidexitType(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  SourceRangegetNameRange(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  SourceRangegetSourceRange(IJavaElement element)
     Returns the SourceRange for the given element, or {-1, -1} if no source range is known for the element.
protected  ITypegetType(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  voidmapSource(IType type, char[] contents, IBinaryType info)
     Maps the given source code to the given binary type and its children.
public synchronized  ISourceRangemapSource(IType type, char[] contents, IBinaryType info, IJavaElement elementToFind)
     Maps the given source code to the given binary type and its children.
protected  voidsetMethodParameterNames(IMethod method, char[][] parameterNames)
     Sets the mapping for this method to its parameter names.
protected  voidsetSourceRange(IJavaElement element, SourceRange sourceRange, SourceRange nameRange)
     Sets the mapping for this element to its source ranges for its source range and name range.

Field Detail
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



categories
protected HashMap categories(Code)



encoding
String encoding(Code)
Options to be used



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.



options
Map options(Code)



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.



searchedElement
protected IJavaElement searchedElement(Code)
The element searched for



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 SourceRanges. 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)



typeDepth
int typeDepth(Code)



typeModifiers
int[] typeModifiers(Code)



typeNameRanges
SourceRange[] typeNameRanges(Code)



types
IType[] types(Code)
Enclosing type information




Constructor Detail
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.




Method Detail
acceptImport
public void acceptImport(int declarationStart, int declarationEnd, char[][] tokens, boolean onDemand, int modifiers)(Code)

See Also:   ISourceElementRequestor



acceptLineSeparatorPositions
public void acceptLineSeparatorPositions(int[] positions)(Code)

See Also:   ISourceElementRequestor



acceptPackage
public void acceptPackage(int declarationStart, int declarationEnd, char[] name)(Code)

See Also:   ISourceElementRequestor



acceptProblem
public void acceptProblem(CategorizedProblem problem)(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.



enterCompilationUnit
public void enterCompilationUnit()(Code)

See Also:   ISourceElementRequestor



enterConstructor
public void enterConstructor(MethodInfo methodInfo)(Code)

See Also:   ISourceElementRequestor



enterField
public void enterField(FieldInfo fieldInfo)(Code)

See Also:   ISourceElementRequestor



enterInitializer
public void enterInitializer(int declarationSourceStart, int modifiers)(Code)

See Also:   ISourceElementRequestor



enterMethod
public void enterMethod(MethodInfo methodInfo)(Code)

See Also:   ISourceElementRequestor



enterType
public void enterType(TypeInfo typeInfo)(Code)

See Also:   ISourceElementRequestor



exitCompilationUnit
public void exitCompilationUnit(int declarationEnd)(Code)

See Also:   ISourceElementRequestor



exitConstructor
public void exitConstructor(int declarationEnd)(Code)

See Also:   ISourceElementRequestor



exitField
public void exitField(int initializationStart, int declarationEnd, int declarationSourceEnd)(Code)

See Also:   ISourceElementRequestor



exitInitializer
public void exitInitializer(int declarationEnd)(Code)

See Also:   ISourceElementRequestor



exitMethod
public void exitMethod(int declarationEnd, int defaultValueStart, int defaultValueEnd)(Code)

See Also:   ISourceElementRequestor



exitType
public void exitType(int declarationEnd)(Code)

See Also:   ISourceElementRequestor



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)



findSource
public char[] findSource(String fullName)(Code)



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



setSourceRange
protected void setSourceRange(IJavaElement element, SourceRange sourceRange, SourceRange nameRange)(Code)
Sets the mapping for this element to its source ranges for its source range and name range.
See Also:   SourceMapper.sourceRanges



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)

Methods inherited from java.lang.Object
native protected Object clone() throws CloneNotSupportedException(Code)(Java Doc)
public boolean equals(Object obj)(Code)(Java Doc)
protected void finalize() throws Throwable(Code)(Java Doc)
final native public Class getClass()(Code)(Java Doc)
native public int hashCode()(Code)(Java Doc)
final native public void notify()(Code)(Java Doc)
final native public void notifyAll()(Code)(Java Doc)
public String toString()(Code)(Java Doc)
final native public void wait(long timeout) throws InterruptedException(Code)(Java Doc)
final public void wait(long timeout, int nanos) throws InterruptedException(Code)(Java Doc)
final public void wait() throws InterruptedException(Code)(Java Doc)

www.java2java.com | Contact Us
Copyright 2009 - 12 Demo Source and Support. All rights reserved.
All other trademarks are property of their respective owners.