Java Doc for ClassEditor.java in  » Database-DBMS » db4o-6.4 » EDU » purdue » cs » bloat » editor » 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 » Database DBMS » db4o 6.4 » EDU.purdue.cs.bloat.editor 
Source Cross Reference  Class Diagram Java Document (Java Doc) 


java.lang.Object
   EDU.purdue.cs.bloat.editor.ClassEditor

ClassEditor
public class ClassEditor (Code)
A ClassEditor provides finer-grain access to a class than a CLassInfo object does. A ClassEditor takes a ClassInfo and extracts the class's constant pool, type, super class type, and the types of its interfaces. When editing is finished, changes are committed with the commit method.
See Also:   ClassInfo
See Also:   MethodEditor
author:
   Nate Nystrom (author:
   href="mailto:nystrom@cs.purdue.edu">nystrom@cs.purdue.edu)


Field Summary
public static  booleanDEBUG
    

Constructor Summary
public  ClassEditor(EditorContext context, ClassInfo classInfo)
     Constructor.
public  ClassEditor(EditorContext context, int modifiers, String className, Type superType, Type[] interfaces)
     Creates a new ClassEditor for editing a class (or interface) from scratch.

Method Summary
public  voidaddInterface(Class interfaceClass)
     Adds an interface of the given class to the set of interfaces that the class implements.
public  voidaddInterface(Type interfaceType)
     Adds an interface of a given Type to the set of interfaces that the class implements.
public  ClassInfoclassInfo()
     Get the ClassInfo object representing the class that being edited.
public  voidcommit()
     Commit any changes to the class since creation time.
public  voidcommitOnly(Set methods, Set fields)
     Commits only certain methods and fields.
public  ConstantPoolconstants()
     Returns the constant pool for the class.
public  EditorContextcontext()
     Obtain the EditorContext for this ClassEditor.
public  booleanequals(Object o)
     Two ClassEditors are equal if they edit the same class.
public  FieldInfo[]fields()
     Returns an array of FieldInfo structures for each field in the class.
public  inthashCode()
     A ClassEditor's hash code is based upon the hash code of the name of the class it edits.
public  Type[]interfaces()
     Returns the interfaces the class implements.
public  booleanisAbstract()
    
public  booleanisDirty()
     Returns true if the class has been modified.
public  booleanisFinal()
    
public  booleanisInterface()
    
public  booleanisPrivate()
    
public  booleanisProtected()
    
public  booleanisPublic()
    
public  booleanisStatic()
    
public  booleanisSuper()
    
public  MethodInfo[]methods()
     Returns an array of MethodInfo structures for each method in the class.
public  intmodifiers()
     Returns the modifiers of the class.
public  Stringname()
     Returns the name of the class represented by this ClassEditor.
public  voidsetAbstract(boolean flag)
    
public  voidsetDirty(boolean dirty)
     Sets this class's dirty flag.
public  voidsetFinal(boolean flag)
    
public  voidsetInterface(boolean flag)
    
public  voidsetInterfaces(Type[] interfaces)
     Returns the interfaces the class implements.
public  voidsetPrivate(boolean flag)
    
public  voidsetProtected(boolean flag)
    
public  voidsetPublic(boolean flag)
    
public  voidsetStatic(boolean flag)
    
public  voidsetSuper(boolean flag)
    
public  voidsetType(Type type)
     Sets the Type (descriptor) object for the class.
public  Typesuperclass()
     Returns a Type object for the class's superclass.
public  StringtoString()
    
public  Typetype()
     Returns the Type (descriptor) for the class.
public  voidvisit(EditorVisitor visitor)
     This class is visited by an EditorVisitor.

Field Detail
DEBUG
public static boolean DEBUG(Code)




Constructor Detail
ClassEditor
public ClassEditor(EditorContext context, ClassInfo classInfo)(Code)
Constructor. Create a new ClassEditor based on information in a ClassInfo object. It extracts the class's constant pool, and the types of the class, its superclass, and any interfaces it implements.
Parameters:
  context - The EditorContext used to edit fields and methods.
Parameters:
  classInfo - The ClassInfo structure of the class to edit.
See Also:   EDU.purdue.cs.bloat.reflect.ClassInfo
See Also:   ConstantPool
See Also:   Type



ClassEditor
public ClassEditor(EditorContext context, int modifiers, String className, Type superType, Type[] interfaces)(Code)
Creates a new ClassEditor for editing a class (or interface) from scratch. This constructor should not be invoked direcly. Use EditorContext.newClass(intStringTypeType[]) instead.




Method Detail
addInterface
public void addInterface(Class interfaceClass)(Code)
Adds an interface of the given class to the set of interfaces that the class implements.
throws:
  IllegalArgumentException - interfaceClass is not aninterface



addInterface
public void addInterface(Type interfaceType)(Code)
Adds an interface of a given Type to the set of interfaces that the class implements.



classInfo
public ClassInfo classInfo()(Code)
Get the ClassInfo object representing the class that being edited.



commit
public void commit()(Code)
Commit any changes to the class since creation time. Note that committal will occur regardless of whether or not the class is dirty.



commitOnly
public void commitOnly(Set methods, Set fields)(Code)
Commits only certain methods and fields. Note that committal will occur regardless of whether or not the class is dirty.
Parameters:
  methods - Methods (MethodInfos) to commit. If null,all methods are committed.
Parameters:
  fields - Fields (FieldInfos) to commit. If null,all fields are committed.



constants
public ConstantPool constants()(Code)
Returns the constant pool for the class.



context
public EditorContext context()(Code)
Obtain the EditorContext for this ClassEditor.



equals
public boolean equals(Object o)(Code)
Two ClassEditors are equal if they edit the same class.



fields
public FieldInfo[] fields()(Code)
Returns an array of FieldInfo structures for each field in the class.



hashCode
public int hashCode()(Code)
A ClassEditor's hash code is based upon the hash code of the name of the class it edits.



interfaces
public Type[] interfaces()(Code)
Returns the interfaces the class implements.



isAbstract
public boolean isAbstract()(Code)



isDirty
public boolean isDirty()(Code)
Returns true if the class has been modified.



isFinal
public boolean isFinal()(Code)



isInterface
public boolean isInterface()(Code)



isPrivate
public boolean isPrivate()(Code)



isProtected
public boolean isProtected()(Code)



isPublic
public boolean isPublic()(Code)



isStatic
public boolean isStatic()(Code)



isSuper
public boolean isSuper()(Code)



methods
public MethodInfo[] methods()(Code)
Returns an array of MethodInfo structures for each method in the class.



modifiers
public int modifiers()(Code)
Returns the modifiers of the class. The values correspond to the constants in the Modifiers class. A bit vector of modifier flags for the class.
See Also:   Modifiers



name
public String name()(Code)
Returns the name of the class represented by this ClassEditor.



setAbstract
public void setAbstract(boolean flag)(Code)



setDirty
public void setDirty(boolean dirty)(Code)
Sets this class's dirty flag. The dirty flag is true if the class has been modified.



setFinal
public void setFinal(boolean flag)(Code)



setInterface
public void setInterface(boolean flag)(Code)



setInterfaces
public void setInterfaces(Type[] interfaces)(Code)
Returns the interfaces the class implements.
Parameters:
  interfaces - An array of Types.



setPrivate
public void setPrivate(boolean flag)(Code)



setProtected
public void setProtected(boolean flag)(Code)



setPublic
public void setPublic(boolean flag)(Code)



setStatic
public void setStatic(boolean flag)(Code)



setSuper
public void setSuper(boolean flag)(Code)



setType
public void setType(Type type)(Code)
Sets the Type (descriptor) object for the class.
Parameters:
  type - A Type.



superclass
public Type superclass()(Code)
Returns a Type object for the class's superclass.



toString
public String toString()(Code)



type
public Type type()(Code)
Returns the Type (descriptor) for the class.



visit
public void visit(EditorVisitor visitor)(Code)
This class is visited by an EditorVisitor. First, this ClassEditor itself is visited. Then, all of this class's fields (FieldEditors) are visited. Finally, each of this class's methods (MethodEditors) are visited. Constructors are visited before regular methods.



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.