Java Doc for MemberDefinition.java in  » 6.0-JDK-Modules-sun » tools » sun » tools » java » 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 » 6.0 JDK Modules sun » tools » sun.tools.java 
Source Cross Reference  Class Diagram Java Document (Java Doc) 


java.lang.Object
   sun.tools.java.MemberDefinition

All known Subclasses:   sun.tools.javac.SourceMember,  sun.tools.java.BinaryMember,  sun.tools.tree.LocalMember,
MemberDefinition
public class MemberDefinition implements Constants(Code)
This class defines a member of a Java class: a variable, a method, or an inner class. WARNING: The contents of this source file are not part of any supported API. Code that depends on them does so at its own risk: they are subject to change or removal without notice.


Field Summary
final static  intPACKAGE_ACCESS
    
final static  intPRIVATE_ACCESS
    
final static  intPROTECTED_ACCESS
    
final static  intPUBLIC_ACCESS
     Constants used by getAccessLevel() to represent the access modifiers as numbers.
protected  MemberDefinitionaccessPeer
    
protected  ClassDefinitionclazz
    
protected  Stringdocumentation
    
protected  ClassDeclarationexp
    
protected  IdentifierTokenexpIds
    
protected  ClassDefinitioninnerClass
    
protected  intmodifiers
    
protected  Identifiername
    
protected  MemberDefinitionnextMatch
    
protected  MemberDefinitionnextMember
    
protected  booleansuperAccessMethod
    
protected  Typetype
    
protected  Nodevalue
    
protected  longwhere
    

Constructor Summary
public  MemberDefinition(long where, ClassDefinition clazz, int modifiers, Type type, Identifier name, IdentifierToken expIds, Node value)
    
public  MemberDefinition(ClassDefinition innerClass)
     Constructor for an inner class.

Method Summary
final public  voidaddModifiers(int mod)
    
final public  booleancanReach(Environment env, MemberDefinition f)
     Check if a field can reach another field (only considers forward references, not the access modifiers).
public  voidcheck(Environment env)
     Request a check of the field definition.
public  Vsetcheck(Environment env, Context ctx, Vset vset)
     Really check the field definition.
public  booleancheckMeet(Environment env, MemberDefinition method, ClassDeclaration clazz)
     Check to see if two method definitions are compatible, that is do they have a `meet'.
public  booleancheckOverride(Environment env, MemberDefinition method)
     Check to see if `this' can override/hide `method'.
public  voidcleanup(Environment env)
    
public  voidcode(Environment env, Assembler asm)
    
public  voidcodeInit(Environment env, Context ctx, Assembler asm)
    
public  booleancouldOverride(Environment env, MemberDefinition method)
     This method is meant to be used to determine if one of two inherited methods could override the other.
public  MemberDefinitiongetAccessMethodTarget()
    
public  MemberDefinitiongetAccessUpdateMember()
     If this method is a getter for a private field, return the setter.
public  VectorgetArguments()
    
final public  ClassDeclarationgetClassDeclaration()
    
final public  ClassDefinitiongetClassDefinition()
    
public  ClassDeclarationgetDefiningClassDeclaration()
    
public  StringgetDocumentation()
    
final public  IdentifierToken[]getExceptionIds()
    
public  ClassDeclaration[]getExceptions(Environment env)
     Get the exceptions that are thrown by this method.
public  ObjectgetInitialValue()
    
public  ClassDefinitiongetInnerClass()
     Get an inner class.
final public  intgetModifiers()
    
final public  IdentifiergetName()
    
final public  MemberDefinitiongetNextMatch()
    
final public  MemberDefinitiongetNextMember()
    
final public  ClassDefinitiongetTopClass()
    
final public  TypegetType()
    
public  NodegetValue(Environment env)
    
final public  NodegetValue()
    
final public  longgetWhere()
    
final public  booleanisAbstract()
    
public  booleanisAccessMethod()
    
final public  booleanisBlankFinal()
     Tell if this is a final variable without an initializer.
public  booleanisConstant()
    
final public  booleanisConstructor()
    
final public  booleanisDeprecated()
    
final public  booleanisFinal()
    
final public  booleanisInitializer()
    
public  booleanisInlineable(Environment env, boolean fromFinal)
    
final public  booleanisInnerClass()
    
public  booleanisLocal()
    
final public  booleanisMethod()
    
final public  booleanisNative()
    
public  booleanisNeverNull()
    
final public  booleanisPackagePrivate()
    
final public  booleanisPrivate()
    
final public  booleanisProtected()
    
final public  booleanisPublic()
    
final public  booleanisStatic()
    
final public  booleanisStrict()
    
final public  booleanisSuperAccessMethod()
    
final public  booleanisSynchronized()
    
final public  booleanisSynthetic()
    
final public  booleanisTransient()
    
public  booleanisUplevelValue()
    
final public  booleanisVariable()
    
final public  booleanisVolatile()
    
public static  MemberDefinitionmakeProxyMember(MemberDefinition field, ClassDefinition classDef, Environment env)
     Create a member which is externally the same as `field' but is defined in class `classDef'.
public  voidprint(PrintStream out)
    
public  booleanreportDeprecated(Environment env)
     Tells whether to report a deprecation error for this field.
public  voidresolveTypeStructure(Environment env)
     A stub.
public  booleansameReturnType(MemberDefinition method)
    
public  voidsetAccessMethodTarget(MemberDefinition target)
    
public  voidsetAccessUpdateMember(MemberDefinition updater)
    
final public  voidsetIsSuperAccessMethod(boolean b)
     Mark this member as an access method for a field selection or method call via the 'super' keyword.
final public  voidsetValue(Node value)
    
final public  voidsubModifiers(int mod)
    
public  StringtoString()
    

Field Detail
PACKAGE_ACCESS
final static int PACKAGE_ACCESS(Code)



PRIVATE_ACCESS
final static int PRIVATE_ACCESS(Code)



PROTECTED_ACCESS
final static int PROTECTED_ACCESS(Code)



PUBLIC_ACCESS
final static int PUBLIC_ACCESS(Code)
Constants used by getAccessLevel() to represent the access modifiers as numbers.



accessPeer
protected MemberDefinition accessPeer(Code)



clazz
protected ClassDefinition clazz(Code)



documentation
protected String documentation(Code)



exp
protected ClassDeclaration exp(Code)



expIds
protected IdentifierToken expIds(Code)



innerClass
protected ClassDefinition innerClass(Code)



modifiers
protected int modifiers(Code)



name
protected Identifier name(Code)



nextMatch
protected MemberDefinition nextMatch(Code)



nextMember
protected MemberDefinition nextMember(Code)



superAccessMethod
protected boolean superAccessMethod(Code)



type
protected Type type(Code)



value
protected Node value(Code)



where
protected long where(Code)




Constructor Detail
MemberDefinition
public MemberDefinition(long where, ClassDefinition clazz, int modifiers, Type type, Identifier name, IdentifierToken expIds, Node value)(Code)
Constructor



MemberDefinition
public MemberDefinition(ClassDefinition innerClass)(Code)
Constructor for an inner class. Inner classes are represented as fields right along with variables and methods for simplicity of data structure, and to reflect properly the textual declaration order.

This constructor calls the generic constructor for this class, extracting all necessary values from the innerClass.





Method Detail
addModifiers
final public void addModifiers(int mod)(Code)



canReach
final public boolean canReach(Environment env, MemberDefinition f)(Code)
Check if a field can reach another field (only considers forward references, not the access modifiers).



check
public void check(Environment env) throws ClassNotFound(Code)
Request a check of the field definition.



check
public Vset check(Environment env, Context ctx, Vset vset) throws ClassNotFound(Code)
Really check the field definition.



checkMeet
public boolean checkMeet(Environment env, MemberDefinition method, ClassDeclaration clazz)(Code)
Check to see if two method definitions are compatible, that is do they have a `meet'. The meet of two methods is essentially and `intersection' of two methods. This method is called when some class C inherits declarations for some method foo from two parents (superclass, interfaces) but it does not, itself, have a declaration of foo. Caller is responsible for making sure that both methods are indeed visible in clazz.
 A - void foo() throws e1
 \
 \     B void foo() throws e2
 \   /
 \ /
 C
 



checkOverride
public boolean checkOverride(Environment env, MemberDefinition method)(Code)
Check to see if `this' can override/hide `method'. Caller is responsible for verifying that `method' has the same signature as `this'. Caller is also responsible for verifying that `method' is visible to the class where this override is occurring. This method is called for the case when class B extends A and both A and B define some method.
 A - void foo() throws e1
 |
 |
 B - void foo() throws e2
 



cleanup
public void cleanup(Environment env)(Code)



code
public void code(Environment env, Assembler asm) throws ClassNotFound(Code)
Generate code



codeInit
public void codeInit(Environment env, Context ctx, Assembler asm) throws ClassNotFound(Code)



couldOverride
public boolean couldOverride(Environment env, MemberDefinition method)(Code)
This method is meant to be used to determine if one of two inherited methods could override the other. Unlike checkOverride(), failure is not an error. This method is only meant to be called after checkMeet() has succeeded on the two methods. If you call couldOverride() without doing a checkMeet() first, then you are on your own.



getAccessMethodTarget
public MemberDefinition getAccessMethodTarget()(Code)
Is this a synthetic method which provides access to a visible private member?



getAccessUpdateMember
public MemberDefinition getAccessUpdateMember()(Code)
If this method is a getter for a private field, return the setter.



getArguments
public Vector getArguments()(Code)
Get arguments (a vector of LocalMember)



getClassDeclaration
final public ClassDeclaration getClassDeclaration()(Code)
Get the class declaration



getClassDefinition
final public ClassDefinition getClassDefinition()(Code)
Get the class definition



getDefiningClassDeclaration
public ClassDeclaration getDefiningClassDeclaration()(Code)
Get the class declaration in which the field is actually defined



getDocumentation
public String getDocumentation()(Code)
Get the field's documentation



getExceptionIds
final public IdentifierToken[] getExceptionIds()(Code)



getExceptions
public ClassDeclaration[] getExceptions(Environment env)(Code)
Get the exceptions that are thrown by this method.



getInitialValue
public Object getInitialValue()(Code)



getInnerClass
public ClassDefinition getInnerClass()(Code)
Get an inner class.



getModifiers
final public int getModifiers()(Code)
Get the field's modifiers



getName
final public Identifier getName()(Code)
Get the field's name



getNextMatch
final public MemberDefinition getNextMatch()(Code)



getNextMember
final public MemberDefinition getNextMember()(Code)
Get the next field or the next match



getTopClass
final public ClassDefinition getTopClass()(Code)
Get the field's top-level enclosing class



getType
final public Type getType()(Code)
Get the field's type



getValue
public Node getValue(Environment env) throws ClassNotFound(Code)
Get the field's final value (may return null)



getValue
final public Node getValue()(Code)



getWhere
final public long getWhere()(Code)
Get the position in the input



isAbstract
final public boolean isAbstract()(Code)



isAccessMethod
public boolean isAccessMethod()(Code)



isBlankFinal
final public boolean isBlankFinal()(Code)
Tell if this is a final variable without an initializer. Such variables are subject to definite single assignment.



isConstant
public boolean isConstant()(Code)
Check if constant: Will it inline away to a constant?



isConstructor
final public boolean isConstructor()(Code)



isDeprecated
final public boolean isDeprecated()(Code)



isFinal
final public boolean isFinal()(Code)



isInitializer
final public boolean isInitializer()(Code)



isInlineable
public boolean isInlineable(Environment env, boolean fromFinal) throws ClassNotFound(Code)



isInnerClass
final public boolean isInnerClass()(Code)



isLocal
public boolean isLocal()(Code)



isMethod
final public boolean isMethod()(Code)



isNative
final public boolean isNative()(Code)



isNeverNull
public boolean isNeverNull()(Code)



isPackagePrivate
final public boolean isPackagePrivate()(Code)



isPrivate
final public boolean isPrivate()(Code)



isProtected
final public boolean isProtected()(Code)



isPublic
final public boolean isPublic()(Code)
Checks



isStatic
final public boolean isStatic()(Code)



isStrict
final public boolean isStrict()(Code)



isSuperAccessMethod
final public boolean isSuperAccessMethod()(Code)
Is this an access method for a field selection or method call of the form '...super.foo' or '...super.foo()'?



isSynchronized
final public boolean isSynchronized()(Code)



isSynthetic
final public boolean isSynthetic()(Code)



isTransient
final public boolean isTransient()(Code)



isUplevelValue
public boolean isUplevelValue()(Code)
Is this a synthetic field which holds a copy of, or reference to, a local variable or enclosing instance?



isVariable
final public boolean isVariable()(Code)



isVolatile
final public boolean isVolatile()(Code)



makeProxyMember
public static MemberDefinition makeProxyMember(MemberDefinition field, ClassDefinition classDef, Environment env)(Code)
Create a member which is externally the same as `field' but is defined in class `classDef'. This is used by code in sun.tools.tree.(MethodExpression,FieldExpression) as part of the fix for bug 4135692. Proxy members should not be added, ala addMember(), to classes. They are merely "stand-ins" to produce modified MethodRef constant pool entries during code generation. We keep a cache of previously created proxy members not to save time or space, but to ensure uniqueness of the proxy member for any (field,classDef) pair. If these are not made unique then we can end up generating duplicate MethodRef constant pool entries during code generation.



print
public void print(PrintStream out)(Code)
Print for debugging



reportDeprecated
public boolean reportDeprecated(Environment env)(Code)
Tells whether to report a deprecation error for this field.



resolveTypeStructure
public void resolveTypeStructure(Environment env)(Code)
A stub. Subclasses can do more checking.



sameReturnType
public boolean sameReturnType(MemberDefinition method)(Code)
Convenience method to see if two methods return the same type



setAccessMethodTarget
public void setAccessMethodTarget(MemberDefinition target)(Code)



setAccessUpdateMember
public void setAccessUpdateMember(MemberDefinition updater)(Code)



setIsSuperAccessMethod
final public void setIsSuperAccessMethod(boolean b)(Code)
Mark this member as an access method for a field selection or method call via the 'super' keyword.



setValue
final public void setValue(Node value)(Code)



subModifiers
final public void subModifiers(int mod)(Code)



toString
public String toString()(Code)
toString



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.