Java Doc for ClassFile.java in  » IDE-Eclipse » jdt » org » eclipse » jdt » internal » compiler » 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.compiler 
Source Cross Reference  Class Diagram Java Document (Java Doc) 


java.lang.Object
   org.eclipse.jdt.internal.compiler.ClassFile

All known Subclasses:   org.eclipse.jdt.internal.eval.CodeSnippetClassFile,
ClassFile
public class ClassFile implements TypeConstants,TypeIds(Code)
Represents a class file wrapper on bytes, it is aware of its actual type name. Public APIs are listed below: byte[] getBytes(); Answer the actual bytes of the class file char[][] getCompoundName(); Answer the compound name of the class file. For example, {{java}, {util}, {Hashtable}}. byte[] getReducedBytes(); Answer a smaller byte format, which is only contains some structural information. Those bytes are decodable with a regular class file reader, such as DietClassFileReader


Field Summary
final public static  intINITIAL_CONTENTS_SIZE
    
final public static  intINITIAL_HEADER_SIZE
    
final public static  intINNER_CLASSES_SIZE
    
public  CodeStreamcodeStream
    
public  ConstantPoolconstantPool
    
public  intconstantPoolOffset
    
public  byte[]contents
    
public  intcontentsOffset
    
protected  booleancreatingProblemType
    
public  ClassFileenclosingClassFile
    
public  byte[]header
    
public  intheaderOffset
    
public  SetinnerClassesBindings
    
public  booleanisShared
    
public  intmethodCount
    
public  intmethodCountOffset
    
public  intproduceAttributes
    
public  SourceTypeBindingreferenceBinding
    
public  longtargetJDK
    

Constructor Summary
protected  ClassFile()
     INTERNAL USE-ONLY This methods creates a new instance of the receiver.
public  ClassFile(SourceTypeBinding typeBinding)
    

Method Summary
public  voidaddAbstractMethod(AbstractMethodDeclaration method, MethodBinding methodBinding)
     INTERNAL USE-ONLY Generate the byte for a problem method info that correspond to a boggus method.
public  voidaddAttributes()
     INTERNAL USE-ONLY This methods generate all the attributes for the receiver.
public  voidaddDefaultAbstractMethods()
     INTERNAL USE-ONLY This methods generate all the default abstract method infos that correpond to the abstract methods inherited from superinterfaces.
public  voidaddFieldInfos()
     INTERNAL USE-ONLY This methods generate all the fields infos for the receiver. This includes: - a field info for each defined field of that class - a field info for each synthetic field (e.g.
public  voidaddProblemClinit(CategorizedProblem[] problems)
     INTERNAL USE-ONLY Generate the byte for a problem clinit method info that correspond to a boggus method.
public  voidaddProblemConstructor(AbstractMethodDeclaration method, MethodBinding methodBinding, CategorizedProblem[] problems)
     INTERNAL USE-ONLY Generate the byte for a problem method info that correspond to a boggus constructor.
public  voidaddProblemConstructor(AbstractMethodDeclaration method, MethodBinding methodBinding, CategorizedProblem[] problems, int savedOffset)
     INTERNAL USE-ONLY Generate the byte for a problem method info that correspond to a boggus constructor.
public  voidaddProblemMethod(AbstractMethodDeclaration method, MethodBinding methodBinding, CategorizedProblem[] problems)
     INTERNAL USE-ONLY Generate the byte for a problem method info that correspond to a boggus method.
public  voidaddProblemMethod(AbstractMethodDeclaration method, MethodBinding methodBinding, CategorizedProblem[] problems, int savedOffset)
     INTERNAL USE-ONLY Generate the byte for a problem method info that correspond to a boggus method.
public  voidaddSpecialMethods()
     INTERNAL USE-ONLY Generate the byte for all the special method infos.
public  voidaddSyntheticConstructorAccessMethod(SyntheticMethodBinding methodBinding)
     INTERNAL USE-ONLY Generate the bytes for a synthetic method that provides an access to a private constructor.
public  voidaddSyntheticEnumValueOfMethod(SyntheticMethodBinding methodBinding)
    
public  voidaddSyntheticEnumValuesMethod(SyntheticMethodBinding methodBinding)
    
public  voidaddSyntheticFieldReadAccessMethod(SyntheticMethodBinding methodBinding)
     INTERNAL USE-ONLY Generate the byte for a problem method info that correspond to a synthetic method that generate an read access to a private field.
public  voidaddSyntheticFieldWriteAccessMethod(SyntheticMethodBinding methodBinding)
     INTERNAL USE-ONLY Generate the byte for a problem method info that correspond to a synthetic method that generate an write access to a private field.
public  voidaddSyntheticMethodAccessMethod(SyntheticMethodBinding methodBinding)
     INTERNAL USE-ONLY Generate the bytes for a synthetic method that provides access to a private method.
public  voidaddSyntheticSwitchTable(SyntheticMethodBinding methodBinding)
    
public static  StringbuildAllDirectoriesInto(String outputPath, String relativeFileName)
     INTERNAL USE-ONLY Build all the directories and subdirectories corresponding to the packages names into the directory specified in parameters.
public  voidcompleteCodeAttribute(int codeAttributeOffset)
     INTERNAL USE-ONLY That method completes the creation of the code attribute by setting - the attribute_length - max_stack - max_locals - code_length - exception table - and debug attributes if necessary.
public  voidcompleteCodeAttributeForClinit(int codeAttributeOffset)
     INTERNAL USE-ONLY That method completes the creation of the code attribute by setting - the attribute_length - max_stack - max_locals - code_length - exception table - and debug attributes if necessary.
public  voidcompleteCodeAttributeForClinit(int codeAttributeOffset, int problemLine)
     INTERNAL USE-ONLY That method completes the creation of the code attribute by setting - the attribute_length - max_stack - max_locals - code_length - exception table - and debug attributes if necessary.
public  voidcompleteCodeAttributeForMissingAbstractProblemMethod(MethodBinding binding, int codeAttributeOffset, int[] startLineIndexes, int problemLine)
    
public  voidcompleteCodeAttributeForProblemMethod(AbstractMethodDeclaration method, MethodBinding binding, int codeAttributeOffset, int[] startLineIndexes, int problemLine)
     INTERNAL USE-ONLY That method completes the creation of the code attribute by setting - the attribute_length - max_stack - max_locals - code_length - exception table - and debug attributes if necessary.
public  voidcompleteCodeAttributeForSyntheticMethod(boolean hasExceptionHandlers, SyntheticMethodBinding binding, int codeAttributeOffset, int[] startLineIndexes)
     INTERNAL USE-ONLY That method completes the creation of the code attribute by setting - the attribute_length - max_stack - max_locals - code_length - exception table - and debug attributes if necessary.
public  voidcompleteCodeAttributeForSyntheticMethod(SyntheticMethodBinding binding, int codeAttributeOffset, int[] startLineIndexes)
     INTERNAL USE-ONLY That method completes the creation of the code attribute by setting - the attribute_length - max_stack - max_locals - code_length - exception table - and debug attributes if necessary.
public  voidcompleteMethodInfo(int methodAttributeOffset, int attributeNumber)
     INTERNAL USE-ONLY Complete the creation of a method info by setting up the number of attributes at the right offset.
public static  voidcreateProblemType(TypeDeclaration typeDeclaration, CompilationResult unitResult)
    
public  char[]fileName()
    
public  voidgenerateCodeAttributeHeader()
     INTERNAL USE-ONLY That method generates the header of a code attribute.
public  intgenerateMethodInfoAttribute(MethodBinding methodBinding)
    
public  intgenerateMethodInfoAttribute(MethodBinding methodBinding, AnnotationMethodDeclaration declaration)
    
public  intgenerateMethodInfoAttribute(MethodBinding methodBinding, boolean createProblemMethod)
     INTERNAL USE-ONLY That method generates the attributes of a code attribute.
public  voidgenerateMethodInfoHeader(MethodBinding methodBinding)
     INTERNAL USE-ONLY That method generates the header of a method info: The header consists in: - the access flags - the name index of the method name inside the constant pool - the descriptor index of the signature of the method inside the constant pool.
public  voidgenerateMethodInfoHeader(MethodBinding methodBinding, int accessFlags)
     INTERNAL USE-ONLY That method generates the header of a method info: The header consists in: - the access flags - the name index of the method name inside the constant pool - the descriptor index of the signature of the method inside the constant pool.
public  voidgenerateMethodInfoHeaderForClinit()
     INTERNAL USE-ONLY That method generates the method info header of a clinit: The header consists in: - the access flags (always default access + static) - the name index of the method name (always ) inside the constant pool - the descriptor index of the signature (always ()V) of the method inside the constant pool.
public  voidgenerateMissingAbstractMethods(MethodDeclaration[] methodDeclarations, CompilationResult compilationResult)
     INTERNAL USE-ONLY Generate the byte for problem method infos that correspond to missing abstract methods.
public  byte[]getBytes()
     EXTERNAL API Answer the actual bytes of the class file This method encodes the receiver structure into a byte array which is the content of the classfile.
public  char[][]getCompoundName()
     EXTERNAL API Answer the compound name of the class file. char[][]e.g.
public static  ClassFilegetNewInstance(SourceTypeBinding typeBinding)
    
protected  voidinitByteArrays()
    
public  voidinitialize(SourceTypeBinding aType, ClassFile parentClassFile, boolean createProblemType)
    
public  ClassFileouterMostEnclosingClassFile()
     INTERNAL USE-ONLY Returns the most enclosing classfile of the receiver.
public  voidrecordInnerClasses(TypeBinding binding)
    
public  voidreset(SourceTypeBinding typeBinding)
    
public  voidsetForMethodInfos()
     INTERNAL USE-ONLY This methods leaves the space for method counts recording.
public  voidtraverse(MethodBinding methodBinding, int maxLocals, byte[] bytecodes, int codeOffset, int codeLength, ArrayList frames, boolean isClinit)
    
public  char[]utf8At(byte[] reference, int absoluteOffset, int bytesAvailable)
    
public static  voidwriteToDisk(boolean generatePackagesStructure, String outputPath, String relativeFileName, ClassFile classFile)
    

Field Detail
INITIAL_CONTENTS_SIZE
final public static int INITIAL_CONTENTS_SIZE(Code)



INITIAL_HEADER_SIZE
final public static int INITIAL_HEADER_SIZE(Code)



INNER_CLASSES_SIZE
final public static int INNER_CLASSES_SIZE(Code)



codeStream
public CodeStream codeStream(Code)



constantPool
public ConstantPool constantPool(Code)



constantPoolOffset
public int constantPoolOffset(Code)



contents
public byte[] contents(Code)



contentsOffset
public int contentsOffset(Code)



creatingProblemType
protected boolean creatingProblemType(Code)



enclosingClassFile
public ClassFile enclosingClassFile(Code)



header
public byte[] header(Code)



headerOffset
public int headerOffset(Code)



innerClassesBindings
public Set innerClassesBindings(Code)



isShared
public boolean isShared(Code)



methodCount
public int methodCount(Code)



methodCountOffset
public int methodCountOffset(Code)



produceAttributes
public int produceAttributes(Code)



referenceBinding
public SourceTypeBinding referenceBinding(Code)



targetJDK
public long targetJDK(Code)




Constructor Detail
ClassFile
protected ClassFile()(Code)
INTERNAL USE-ONLY This methods creates a new instance of the receiver.



ClassFile
public ClassFile(SourceTypeBinding typeBinding)(Code)




Method Detail
addAbstractMethod
public void addAbstractMethod(AbstractMethodDeclaration method, MethodBinding methodBinding)(Code)
INTERNAL USE-ONLY Generate the byte for a problem method info that correspond to a boggus method.
Parameters:
  method - org.eclipse.jdt.internal.compiler.ast.AbstractMethodDeclaration
Parameters:
  methodBinding - org.eclipse.jdt.internal.compiler.nameloopkup.MethodBinding



addAttributes
public void addAttributes()(Code)
INTERNAL USE-ONLY This methods generate all the attributes for the receiver. For a class they could be: - source file attribute - inner classes attribute - deprecated attribute



addDefaultAbstractMethods
public void addDefaultAbstractMethods()(Code)
INTERNAL USE-ONLY This methods generate all the default abstract method infos that correpond to the abstract methods inherited from superinterfaces.



addFieldInfos
public void addFieldInfos()(Code)
INTERNAL USE-ONLY This methods generate all the fields infos for the receiver. This includes: - a field info for each defined field of that class - a field info for each synthetic field (e.g. this$0)



addProblemClinit
public void addProblemClinit(CategorizedProblem[] problems)(Code)
INTERNAL USE-ONLY Generate the byte for a problem clinit method info that correspond to a boggus method.
Parameters:
  problems - org.eclipse.jdt.internal.compiler.problem.Problem[]



addProblemConstructor
public void addProblemConstructor(AbstractMethodDeclaration method, MethodBinding methodBinding, CategorizedProblem[] problems)(Code)
INTERNAL USE-ONLY Generate the byte for a problem method info that correspond to a boggus constructor.
Parameters:
  method - org.eclipse.jdt.internal.compiler.ast.AbstractMethodDeclaration
Parameters:
  methodBinding - org.eclipse.jdt.internal.compiler.nameloopkup.MethodBinding
Parameters:
  problems - org.eclipse.jdt.internal.compiler.problem.Problem[]



addProblemConstructor
public void addProblemConstructor(AbstractMethodDeclaration method, MethodBinding methodBinding, CategorizedProblem[] problems, int savedOffset)(Code)
INTERNAL USE-ONLY Generate the byte for a problem method info that correspond to a boggus constructor. Reset the position inside the contents byte array to the savedOffset.
Parameters:
  method - org.eclipse.jdt.internal.compiler.ast.AbstractMethodDeclaration
Parameters:
  methodBinding - org.eclipse.jdt.internal.compiler.nameloopkup.MethodBinding
Parameters:
  problems - org.eclipse.jdt.internal.compiler.problem.Problem[]
Parameters:
  savedOffset - int



addProblemMethod
public void addProblemMethod(AbstractMethodDeclaration method, MethodBinding methodBinding, CategorizedProblem[] problems)(Code)
INTERNAL USE-ONLY Generate the byte for a problem method info that correspond to a boggus method.
Parameters:
  method - org.eclipse.jdt.internal.compiler.ast.AbstractMethodDeclaration
Parameters:
  methodBinding - org.eclipse.jdt.internal.compiler.nameloopkup.MethodBinding
Parameters:
  problems - org.eclipse.jdt.internal.compiler.problem.Problem[]



addProblemMethod
public void addProblemMethod(AbstractMethodDeclaration method, MethodBinding methodBinding, CategorizedProblem[] problems, int savedOffset)(Code)
INTERNAL USE-ONLY Generate the byte for a problem method info that correspond to a boggus method. Reset the position inside the contents byte array to the savedOffset.
Parameters:
  method - org.eclipse.jdt.internal.compiler.ast.AbstractMethodDeclaration
Parameters:
  methodBinding - org.eclipse.jdt.internal.compiler.nameloopkup.MethodBinding
Parameters:
  problems - org.eclipse.jdt.internal.compiler.problem.Problem[]
Parameters:
  savedOffset - int



addSpecialMethods
public void addSpecialMethods()(Code)
INTERNAL USE-ONLY Generate the byte for all the special method infos. They are: - synthetic access methods - default abstract methods



addSyntheticConstructorAccessMethod
public void addSyntheticConstructorAccessMethod(SyntheticMethodBinding methodBinding)(Code)
INTERNAL USE-ONLY Generate the bytes for a synthetic method that provides an access to a private constructor.
Parameters:
  methodBinding - org.eclipse.jdt.internal.compiler.nameloopkup.SyntheticAccessMethodBinding



addSyntheticEnumValueOfMethod
public void addSyntheticEnumValueOfMethod(SyntheticMethodBinding methodBinding)(Code)
INTERNAL USE-ONLY Generate the bytes for a synthetic method that implements Enum#valueOf(String) for a given enum type
Parameters:
  methodBinding - org.eclipse.jdt.internal.compiler.nameloopkup.SyntheticAccessMethodBinding



addSyntheticEnumValuesMethod
public void addSyntheticEnumValuesMethod(SyntheticMethodBinding methodBinding)(Code)
INTERNAL USE-ONLY Generate the bytes for a synthetic method that implements Enum#values() for a given enum type
Parameters:
  methodBinding - org.eclipse.jdt.internal.compiler.nameloopkup.SyntheticAccessMethodBinding



addSyntheticFieldReadAccessMethod
public void addSyntheticFieldReadAccessMethod(SyntheticMethodBinding methodBinding)(Code)
INTERNAL USE-ONLY Generate the byte for a problem method info that correspond to a synthetic method that generate an read access to a private field.
Parameters:
  methodBinding - org.eclipse.jdt.internal.compiler.nameloopkup.SyntheticAccessMethodBinding



addSyntheticFieldWriteAccessMethod
public void addSyntheticFieldWriteAccessMethod(SyntheticMethodBinding methodBinding)(Code)
INTERNAL USE-ONLY Generate the byte for a problem method info that correspond to a synthetic method that generate an write access to a private field.
Parameters:
  methodBinding - org.eclipse.jdt.internal.compiler.nameloopkup.SyntheticAccessMethodBinding



addSyntheticMethodAccessMethod
public void addSyntheticMethodAccessMethod(SyntheticMethodBinding methodBinding)(Code)
INTERNAL USE-ONLY Generate the bytes for a synthetic method that provides access to a private method.
Parameters:
  methodBinding - org.eclipse.jdt.internal.compiler.nameloopkup.SyntheticAccessMethodBinding



addSyntheticSwitchTable
public void addSyntheticSwitchTable(SyntheticMethodBinding methodBinding)(Code)



buildAllDirectoriesInto
public static String buildAllDirectoriesInto(String outputPath, String relativeFileName) throws IOException(Code)
INTERNAL USE-ONLY Build all the directories and subdirectories corresponding to the packages names into the directory specified in parameters. outputPath is formed like: c:\temp\ the last character is a file separator relativeFileName is formed like: java\lang\String.class *
Parameters:
  outputPath - java.lang.String
Parameters:
  relativeFileName - java.lang.String java.lang.String



completeCodeAttribute
public void completeCodeAttribute(int codeAttributeOffset)(Code)
INTERNAL USE-ONLY That method completes the creation of the code attribute by setting - the attribute_length - max_stack - max_locals - code_length - exception table - and debug attributes if necessary.
Parameters:
  codeAttributeOffset - int



completeCodeAttributeForClinit
public void completeCodeAttributeForClinit(int codeAttributeOffset)(Code)
INTERNAL USE-ONLY That method completes the creation of the code attribute by setting - the attribute_length - max_stack - max_locals - code_length - exception table - and debug attributes if necessary.
Parameters:
  codeAttributeOffset - int



completeCodeAttributeForClinit
public void completeCodeAttributeForClinit(int codeAttributeOffset, int problemLine)(Code)
INTERNAL USE-ONLY That method completes the creation of the code attribute by setting - the attribute_length - max_stack - max_locals - code_length - exception table - and debug attributes if necessary.



completeCodeAttributeForMissingAbstractProblemMethod
public void completeCodeAttributeForMissingAbstractProblemMethod(MethodBinding binding, int codeAttributeOffset, int[] startLineIndexes, int problemLine)(Code)



completeCodeAttributeForProblemMethod
public void completeCodeAttributeForProblemMethod(AbstractMethodDeclaration method, MethodBinding binding, int codeAttributeOffset, int[] startLineIndexes, int problemLine)(Code)
INTERNAL USE-ONLY That method completes the creation of the code attribute by setting - the attribute_length - max_stack - max_locals - code_length - exception table - and debug attributes if necessary.
Parameters:
  codeAttributeOffset - int



completeCodeAttributeForSyntheticMethod
public void completeCodeAttributeForSyntheticMethod(boolean hasExceptionHandlers, SyntheticMethodBinding binding, int codeAttributeOffset, int[] startLineIndexes)(Code)
INTERNAL USE-ONLY That method completes the creation of the code attribute by setting - the attribute_length - max_stack - max_locals - code_length - exception table - and debug attributes if necessary.
Parameters:
  binding - org.eclipse.jdt.internal.compiler.lookup.SyntheticAccessMethodBinding
Parameters:
  codeAttributeOffset - int



completeCodeAttributeForSyntheticMethod
public void completeCodeAttributeForSyntheticMethod(SyntheticMethodBinding binding, int codeAttributeOffset, int[] startLineIndexes)(Code)
INTERNAL USE-ONLY That method completes the creation of the code attribute by setting - the attribute_length - max_stack - max_locals - code_length - exception table - and debug attributes if necessary.
Parameters:
  binding - org.eclipse.jdt.internal.compiler.lookup.SyntheticAccessMethodBinding
Parameters:
  codeAttributeOffset - int



completeMethodInfo
public void completeMethodInfo(int methodAttributeOffset, int attributeNumber)(Code)
INTERNAL USE-ONLY Complete the creation of a method info by setting up the number of attributes at the right offset.
Parameters:
  methodAttributeOffset - int
Parameters:
  attributeNumber - int



createProblemType
public static void createProblemType(TypeDeclaration typeDeclaration, CompilationResult unitResult)(Code)
INTERNAL USE-ONLY Request the creation of a ClassFile compatible representation of a problematic type
Parameters:
  typeDeclaration - org.eclipse.jdt.internal.compiler.ast.TypeDeclaration
Parameters:
  unitResult - org.eclipse.jdt.internal.compiler.CompilationUnitResult



fileName
public char[] fileName()(Code)
INTERNAL USE-ONLY This methods returns a char[] representing the file name of the receiver char[]



generateCodeAttributeHeader
public void generateCodeAttributeHeader()(Code)
INTERNAL USE-ONLY That method generates the header of a code attribute. - the index inside the constant pool for the attribute name ("Code") - leave some space for attribute_length(4), max_stack(2), max_locals(2), code_length(4).



generateMethodInfoAttribute
public int generateMethodInfoAttribute(MethodBinding methodBinding)(Code)



generateMethodInfoAttribute
public int generateMethodInfoAttribute(MethodBinding methodBinding, AnnotationMethodDeclaration declaration)(Code)



generateMethodInfoAttribute
public int generateMethodInfoAttribute(MethodBinding methodBinding, boolean createProblemMethod)(Code)
INTERNAL USE-ONLY That method generates the attributes of a code attribute. They could be: - an exception attribute for each try/catch found inside the method - a deprecated attribute - a synthetic attribute for synthetic access methods It returns the number of attributes created for the code attribute.
Parameters:
  methodBinding - org.eclipse.jdt.internal.compiler.lookup.MethodBinding int



generateMethodInfoHeader
public void generateMethodInfoHeader(MethodBinding methodBinding)(Code)
INTERNAL USE-ONLY That method generates the header of a method info: The header consists in: - the access flags - the name index of the method name inside the constant pool - the descriptor index of the signature of the method inside the constant pool.
Parameters:
  methodBinding - org.eclipse.jdt.internal.compiler.lookup.MethodBinding



generateMethodInfoHeader
public void generateMethodInfoHeader(MethodBinding methodBinding, int accessFlags)(Code)
INTERNAL USE-ONLY That method generates the header of a method info: The header consists in: - the access flags - the name index of the method name inside the constant pool - the descriptor index of the signature of the method inside the constant pool.
Parameters:
  methodBinding - org.eclipse.jdt.internal.compiler.lookup.MethodBinding
Parameters:
  accessFlags - the access flags



generateMethodInfoHeaderForClinit
public void generateMethodInfoHeaderForClinit()(Code)
INTERNAL USE-ONLY That method generates the method info header of a clinit: The header consists in: - the access flags (always default access + static) - the name index of the method name (always ) inside the constant pool - the descriptor index of the signature (always ()V) of the method inside the constant pool.



generateMissingAbstractMethods
public void generateMissingAbstractMethods(MethodDeclaration[] methodDeclarations, CompilationResult compilationResult)(Code)
INTERNAL USE-ONLY Generate the byte for problem method infos that correspond to missing abstract methods. http://dev.eclipse.org/bugs/show_bug.cgi?id=3179
Parameters:
  methodDeclarations - Array of all missing abstract methods



getBytes
public byte[] getBytes()(Code)
EXTERNAL API Answer the actual bytes of the class file This method encodes the receiver structure into a byte array which is the content of the classfile. Returns the byte array that represents the encoded structure of the receiver. byte[]



getCompoundName
public char[][] getCompoundName()(Code)
EXTERNAL API Answer the compound name of the class file. char[][]e.g. {{java}, {util}, {Hashtable}}.



getNewInstance
public static ClassFile getNewInstance(SourceTypeBinding typeBinding)(Code)



initByteArrays
protected void initByteArrays()(Code)



initialize
public void initialize(SourceTypeBinding aType, ClassFile parentClassFile, boolean createProblemType)(Code)



outerMostEnclosingClassFile
public ClassFile outerMostEnclosingClassFile()(Code)
INTERNAL USE-ONLY Returns the most enclosing classfile of the receiver. This is used know to store the constant pool name for all inner types of the receiver. org.eclipse.jdt.internal.compiler.codegen.ClassFile



recordInnerClasses
public void recordInnerClasses(TypeBinding binding)(Code)



reset
public void reset(SourceTypeBinding typeBinding)(Code)



setForMethodInfos
public void setForMethodInfos()(Code)
INTERNAL USE-ONLY This methods leaves the space for method counts recording.



traverse
public void traverse(MethodBinding methodBinding, int maxLocals, byte[] bytecodes, int codeOffset, int codeLength, ArrayList frames, boolean isClinit)(Code)



utf8At
public char[] utf8At(byte[] reference, int absoluteOffset, int bytesAvailable)(Code)



writeToDisk
public static void writeToDisk(boolean generatePackagesStructure, String outputPath, String relativeFileName, ClassFile classFile) throws IOException(Code)
INTERNAL USE-ONLY outputPath is formed like: c:\temp\ the last character is a file separator relativeFileName is formed like: java\lang\String.class
Parameters:
  generatePackagesStructure - a flag to know if the packages structure has to be generated.
Parameters:
  outputPath - the given output directory
Parameters:
  relativeFileName - the given relative file name
Parameters:
  classFile - the given classFile to write



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.