Java Doc for ClassDefinition.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.ClassDefinition

All known Subclasses:   sun.tools.javac.SourceClass,  sun.tools.java.BinaryClass,
ClassDefinition
public class ClassDefinition implements Constants(Code)
This class is a Java class definition 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
 MethodSetallMethods
    
protected  ContextclassContext
    
protected  ClassDeclarationdeclaration
    
protected static  booleandoInheritanceChecks
     A flag used by turnOffInheritanceChecks() to indicate if inheritance checks are on or off.
protected  Stringdocumentation
    
protected  booleanerror
    
protected  MemberDefinitionfirstMember
    
protected  MemberDefinitioninnerClassMember
    
protected  IdentifierTokeninterfaceIds
    
protected  ClassDeclarationinterfaces
    
protected  MemberDefinitionlastMember
    
protected  IdentifierlocalName
    
protected  intmodifiers
    
protected  booleannestError
    
protected  ClassDefinitionouterClass
    
protected  MemberDefinitionouterMember
    
protected  UplevelReferencereferences
    
protected  booleanreferencesFrozen
    
protected  booleanresolved
    
protected  Objectsource
    
protected  ClassDeclarationsuperClass
    
protected  IdentifierTokensuperClassId
    
protected  booleansupersCheckStarted
    
protected  longwhere
    

Constructor Summary
protected  ClassDefinition(Object source, long where, ClassDeclaration declaration, int modifiers, IdentifierToken superClass, IdentifierToken interfaces)
    

Method Summary
public  voidaddDependency(ClassDeclaration c)
    
public  voidaddLocalClass(ClassDefinition c, String name)
    
public  voidaddMember(MemberDefinition field)
    
public  voidaddMember(Environment env, MemberDefinition field)
    
protected  voidaddMirandaMethods(Environment env, Iterator mirandas)
     Add a list of methods to this class as miranda methods.
final public  voidaddModifiers(int mod)
    
protected  UplevelReferenceaddReference(LocalMember target)
    
protected  voidbasicCheck(Environment env)
    
public  booleancanAccess(Environment env, ClassDeclaration c)
     Check if another class can be accessed from within the body of this class.
public  booleancanAccess(Environment env, MemberDefinition f)
    
public  voidcheck(Environment env)
     Check this class.
public  VsetcheckLocalClass(Environment env, Context ctx, Vset vset, ClassDefinition sup, Expression args, Type argTypes)
    
public  voidcleanup(Environment env)
     After the class has been written to disk, try to free up some storage.
protected  voidcollectInheritedMethods(Environment env)
    

Collect all methods defined in this class or inherited from any of our superclasses or interfaces.

public static  booleancontainsDeprecated(String documentation)
     Return true if the given documentation string contains a deprecation paragraph.
public  booleancouldImplement(ClassDefinition intDef)
     Check to see if a class which implements interface `this' could possibly implement the interface `intDef'.
public  intdiagnoseMismatch(Environment env, Identifier nm, Type argTypes, int start, Type margTypeResult)
     Given the fact that this class has no method "nm" matching "argTypes", find out if the mismatch can be blamed on a particular actual argument which disagrees with all of the overloadings.
public  booleanenclosingClassOf(ClassDefinition otherClass)
    
public  booleanextendsCanAccess(Environment env, ClassDeclaration c)
     Check if another class can be accessed from the 'extends' or 'implements' clause of this class.
public  MemberDefinitionfindAnyMethod(Environment env, Identifier nm)
     Find any method with a given name.
public  MemberDefinitionfindMethod(Environment env, Identifier nm, Type t)
     Find a method, ie: exact match in this class or any of the super classes. Only called by javadoc.
final public  MemberDefinitionfindOuterMember()
     If inner, return an innermost uplevel self pointer, if any exists.
public  MemberDefinitiongetAccessMember(Environment env, Context ctx, MemberDefinition field, boolean isSuper)
     Find or create an access method for a private member, or return null if this is not possible.
public  ContextgetClassContext()
    
final public  ClassDeclarationgetClassDeclaration()
    
public  MemberDefinitiongetClassLiteralLookup(long fwhere)
     Get helper method for class literal lookup.
public  StringgetDocumentation()
    
final public  booleangetError()
     Check if there were any errors in this class.
final public  MemberDefinitiongetFirstMatch(Identifier name)
    
final public  MemberDefinitiongetFirstMember()
    
public  MemberDefinitiongetInnerClass(Environment env, Identifier nm)
     Get an inner class.
final public  MemberDefinitiongetInnerClassMember()
    
final public  ClassDeclarationgetInterfaces()
    
public  ClassDefinitiongetLocalClass(String name)
     Maintain a hash table of local and anonymous classes whose internal names are prefixed by the current class.
public  IdentifiergetLocalName()
     Return a simple identifier for this class (idNull if anonymous).
public  IteratorgetMethods(Environment env)
     Get an Iterator of all methods which could be accessed in an instance of this class.
public  IteratorgetMethods()
     Get an Iterator of all methods which could be accessed in an instance of this class.
final public  intgetModifiers()
    
final public  IdentifiergetName()
    
final public  booleangetNestError()
     Check if there were any errors in our class nest.
final public  ClassDefinitiongetOuterClass()
    
protected  IteratorgetPermanentlyAbstractMethods()
     This method returns an Iterator of all abstract methods in our superclasses which we are unable to implement.
public  UplevelReferencegetReference(LocalMember target)
     Find or create an uplevel reference for the given target.
public  UplevelReferencegetReferences()
     Return the list of all uplevel references.
public  UplevelReferencegetReferencesFrozen()
     Return the same value as getReferences.
final public  ObjectgetSource()
    
final public  ClassDeclarationgetSuperClass()
    
public  ClassDeclarationgetSuperClass(Environment env)
     Get the super class, and resolve names now if necessary. It is only possible to resolve names at this point if we are a source class.
final public  ClassDefinitiongetTopClass()
    
final public  TypegetType()
    
public  MemberDefinitiongetUpdateMember(Environment env, Context ctx, MemberDefinition field, boolean isSuper)
     Find or create an update method for a private member, or return null if this is not possible.
public  MemberDefinitiongetVariable(Environment env, Identifier nm, ClassDefinition source)
     Get a field from this class.
final public  longgetWhere()
    
final public  booleanhasConstructor()
    
public  booleanimplementedBy(Environment env, ClassDeclaration c)
    
final public  booleaninSamePackage(ClassDeclaration c)
    
final public  booleaninSamePackage(ClassDefinition c)
    
final public  booleaninSamePackage(Identifier packageName)
    
public  voidinlineLocalClass(Environment env)
    
public  booleaninnerClassExists(Identifier nm)
     While resolving import directives, the question has arisen: does a given inner class exist? If the top-level class exists, we ask it about an inner class via this method.
final public  booleanisAbstract()
    
final public  booleanisAnonymous()
    
final public  booleanisClass()
    
final public  booleanisDeprecated()
    
final public  booleanisFinal()
    
final public  booleanisInnerClass()
     Tell if the class is inner.
final public  booleanisInsideLocal()
     Tell if the class is local or inside a local class, which means it cannot be mentioned outside of its file.
final public  booleanisInsideLocalOrAnonymous()
     Tell if the class is local or or anonymous class, or inside such a class, which means it cannot be mentioned outside of its file.
final public  booleanisInterface()
    
final public  booleanisLocal()
    
final public  booleanisMember()
     Tell if the class is a member of another class.
final public  booleanisPackagePrivate()
    
final public  booleanisPrivate()
    
final public  booleanisProtected()
    
final public  booleanisPublic()
    
final public  booleanisStatic()
     See if this is a (nested) static class.
final public  booleanisSynthetic()
    
final public  booleanisTopLevel()
     Tell if the class is "top-level", which is either a package member, or a static member of another top-level class.
public  MemberDefinitionmatchAnonConstructor(Environment env, Identifier accessPackage, Type argumentTypes)
     A version of matchMethod to be used only for constructors when we cannot pass in a sourceClass argument.
public  MemberDefinitionmatchMethod(Environment env, ClassDefinition accessor, Identifier methodName, Type[] argumentTypes)
     Lookup a method.
public  MemberDefinitionmatchMethod(Environment env, ClassDefinition accessor, Identifier methodName)
     Lookup a method.
final public  booleanmustBeAbstract(Environment env)
     Check to see if a class must be abstract.
public  voidnoteUsedBy(ClassDefinition ref, long where, Environment env)
     Note that this class is being used somehow by ref.
public  booleanpermitInlinedAccess(Environment env, ClassDeclaration c)
     Check if a class is entitled to inline access to a class from another class.
public  booleanpermitInlinedAccess(Environment env, MemberDefinition f)
     Check if a class is entitled to inline access to a method from another class.
public  voidprint(PrintStream out)
    
public  booleanprotectedAccess(Environment env, MemberDefinition f, Type accessorType)
     We know the the field is marked protected (and not public) and that the field is visible (as per canAccess).
final public  voidreferencesMustNotBeFrozen()
    
public  booleanreportDeprecated(Environment env)
     Tells whether to report a deprecation error for this class.
public  IdentifierresolveInnerClass(Environment env, Identifier nm)
     Interpret a qualified class name, which may have further subcomponents.. Follow inheritance links, as in: class C { class N { } } class D extends C { } ...
public  IdentifierresolveName(Environment env, Identifier name)
     Look up an inner class name, from somewhere inside this class. Since supers and outers are in scope, search them too.

If no inner class is found, env.resolveName() is then called, to interpret the ambient package and import directives.

This routine operates on a "best-efforts" basis.

public  voidresolveTypeStructure(Environment env)
     We create a stub for this.
final public  voidsetError()
     Mark this class to be erroneous.
public  voidsetLocalName(Identifier name)
     Set the local name of a class.
final public  voidsetNestError()
     Mark this class, and all siblings in its class nest, to be erroneous.
final protected  voidsetOuterClass(ClassDefinition outerClass)
     Set the class' enclosing class.
final protected  voidsetOuterMember(MemberDefinition outerMember)
     Set the class' enclosing current instance pointer.
public  booleansubClassOf(Environment env, ClassDeclaration otherClass)
    
final public  voidsubModifiers(int mod)
    
public  booleansuperClassOf(Environment env, ClassDeclaration otherClass)
    
public  StringtoString()
    
public static  voidturnOffInheritanceChecks()
     This is a workaround to allow javadoc to turn off certain inheritance/override checks which interfere with javadoc badly.

Field Detail
allMethods
MethodSet allMethods(Code)



classContext
protected Context classContext(Code)



declaration
protected ClassDeclaration declaration(Code)



doInheritanceChecks
protected static boolean doInheritanceChecks(Code)
A flag used by turnOffInheritanceChecks() to indicate if inheritance checks are on or off.



documentation
protected String documentation(Code)



error
protected boolean error(Code)



firstMember
protected MemberDefinition firstMember(Code)



innerClassMember
protected MemberDefinition innerClassMember(Code)



interfaceIds
protected IdentifierToken interfaceIds(Code)



interfaces
protected ClassDeclaration interfaces(Code)



lastMember
protected MemberDefinition lastMember(Code)



localName
protected Identifier localName(Code)



modifiers
protected int modifiers(Code)



nestError
protected boolean nestError(Code)



outerClass
protected ClassDefinition outerClass(Code)



outerMember
protected MemberDefinition outerMember(Code)



references
protected UplevelReference references(Code)



referencesFrozen
protected boolean referencesFrozen(Code)



resolved
protected boolean resolved(Code)



source
protected Object source(Code)



superClass
protected ClassDeclaration superClass(Code)



superClassId
protected IdentifierToken superClassId(Code)



supersCheckStarted
protected boolean supersCheckStarted(Code)



where
protected long where(Code)




Constructor Detail
ClassDefinition
protected ClassDefinition(Object source, long where, ClassDeclaration declaration, int modifiers, IdentifierToken superClass, IdentifierToken interfaces)(Code)
Constructor




Method Detail
addDependency
public void addDependency(ClassDeclaration c)(Code)
Add a dependency



addLocalClass
public void addLocalClass(ClassDefinition c, String name)(Code)



addMember
public void addMember(MemberDefinition field)(Code)
Add a field (no checks)



addMember
public void addMember(Environment env, MemberDefinition field)(Code)
Add a field (subclasses make checks)



addMirandaMethods
protected void addMirandaMethods(Environment env, Iterator mirandas)(Code)
Add a list of methods to this class as miranda methods. This gets overridden with a meaningful implementation in SourceClass. BinaryClass should not need to do anything -- it should already have its miranda methods and, if it doesn't, then that doesn't affect our compilation.



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



addReference
protected UplevelReference addReference(LocalMember target)(Code)



basicCheck
protected void basicCheck(Environment env) throws ClassNotFound(Code)



canAccess
public boolean canAccess(Environment env, ClassDeclaration c) throws ClassNotFound(Code)
Check if another class can be accessed from within the body of this class.



canAccess
public boolean canAccess(Environment env, MemberDefinition f) throws ClassNotFound(Code)
Check if a field can be accessed from a class



check
public void check(Environment env) throws ClassNotFound(Code)
Check this class.



checkLocalClass
public Vset checkLocalClass(Environment env, Context ctx, Vset vset, ClassDefinition sup, Expression args, Type argTypes) throws ClassNotFound(Code)



cleanup
public void cleanup(Environment env)(Code)
After the class has been written to disk, try to free up some storage.



collectInheritedMethods
protected void collectInheritedMethods(Environment env)(Code)

Collect all methods defined in this class or inherited from any of our superclasses or interfaces. Look for any incompatible definitions.

This function is also responsible for collecting the Miranda methods for a class. For a definition of Miranda methods, see the comment in addMirandaMethods() below.




containsDeprecated
public static boolean containsDeprecated(String documentation)(Code)
Return true if the given documentation string contains a deprecation paragraph. This is true if the string contains the tag @deprecated is the first word in a line.



couldImplement
public boolean couldImplement(ClassDefinition intDef)(Code)
Check to see if a class which implements interface `this' could possibly implement the interface `intDef'. Note that the only way that this can fail is if `this' and `intDef' have methods which are of the same signature and different return types. This method is used by Environment.explicitCast() to determine if a cast between two interfaces is legal. This method should only be called on a class after it has been basicCheck()'ed.



diagnoseMismatch
public int diagnoseMismatch(Environment env, Identifier nm, Type argTypes, int start, Type margTypeResult) throws ClassNotFound(Code)
Given the fact that this class has no method "nm" matching "argTypes", find out if the mismatch can be blamed on a particular actual argument which disagrees with all of the overloadings. If so, return the code (i<<2)+(castOK<<1)+ambig, where "i" is the number of the offending argument, and "castOK" is 1 if a cast could fix the problem. The target type for the argument is returned in margTypeResult[0]. If not all methods agree on this type, "ambig" is 1. If there is more than one method, the choice of target type is arbitrary.

Return -1 if every argument is acceptable to at least one method. Return -2 if there are no methods of the required arity. The value "start" gives the index of the first argument to begin checking.




enclosingClassOf
public boolean enclosingClassOf(ClassDefinition otherClass)(Code)
Check if this is an enclosing class of another class



extendsCanAccess
public boolean extendsCanAccess(Environment env, ClassDeclaration c) throws ClassNotFound(Code)
Check if another class can be accessed from the 'extends' or 'implements' clause of this class.



findAnyMethod
public MemberDefinition findAnyMethod(Environment env, Identifier nm) throws ClassNotFound(Code)
Find any method with a given name.



findMethod
public MemberDefinition findMethod(Environment env, Identifier nm, Type t) throws ClassNotFound(Code)
Find a method, ie: exact match in this class or any of the super classes. Only called by javadoc. For now I am holding off rewriting this code to rely on collectInheritedMethods(), as that code has not gotten along with javadoc in the past.



findOuterMember
final public MemberDefinition findOuterMember()(Code)
If inner, return an innermost uplevel self pointer, if any exists. Otherwise, return null.



getAccessMember
public MemberDefinition getAccessMember(Environment env, Context ctx, MemberDefinition field, boolean isSuper)(Code)
Find or create an access method for a private member, or return null if this is not possible.



getClassContext
public Context getClassContext()(Code)



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



getClassLiteralLookup
public MemberDefinition getClassLiteralLookup(long fwhere)(Code)
Get helper method for class literal lookup.



getDocumentation
public String getDocumentation()(Code)
Get the class' documentation



getError
final public boolean getError()(Code)
Check if there were any errors in this class.



getFirstMatch
final public MemberDefinition getFirstMatch(Identifier name)(Code)



getFirstMember
final public MemberDefinition getFirstMember()(Code)
Get the class' first field or first match



getInnerClass
public MemberDefinition getInnerClass(Environment env, Identifier nm) throws ClassNotFound(Code)
Get an inner class. Look in supers but not outers. (This is used directly to resolve expressions like "site.K", and inside a loop to resolve lone names like "K" or the "K" in "K.L".) Called from 'Context' and 'FieldExpression' as well as this class.
See Also:   FieldExpression.checkCommon
See Also:   resolveName



getInnerClassMember
final public MemberDefinition getInnerClassMember()(Code)
If inner, get the field for this class in the enclosing class



getInterfaces
final public ClassDeclaration getInterfaces()(Code)
Get the class' interfaces



getLocalClass
public ClassDefinition getLocalClass(String name)(Code)
Maintain a hash table of local and anonymous classes whose internal names are prefixed by the current class. The key is the simple internal name, less the prefix.



getLocalName
public Identifier getLocalName()(Code)
Return a simple identifier for this class (idNull if anonymous).



getMethods
public Iterator getMethods(Environment env)(Code)
Get an Iterator of all methods which could be accessed in an instance of this class.



getMethods
public Iterator getMethods()(Code)
Get an Iterator of all methods which could be accessed in an instance of this class. Throw a compiler error if we haven't generated this information yet.



getModifiers
final public int getModifiers()(Code)
Get the class' modifiers



getName
final public Identifier getName()(Code)
Get the class' name



getNestError
final public boolean getNestError()(Code)
Check if there were any errors in our class nest.



getOuterClass
final public ClassDefinition getOuterClass()(Code)
Get the class' enclosing class (or null if not inner)



getPermanentlyAbstractMethods
protected Iterator getPermanentlyAbstractMethods()(Code)
This method returns an Iterator of all abstract methods in our superclasses which we are unable to implement.



getReference
public UplevelReference getReference(LocalMember target)(Code)
Find or create an uplevel reference for the given target.



getReferences
public UplevelReference getReferences()(Code)
Return the list of all uplevel references.



getReferencesFrozen
public UplevelReference getReferencesFrozen()(Code)
Return the same value as getReferences. Also, mark the set of references frozen. After that, it is an error to add new references.



getSource
final public Object getSource()(Code)
Get the source of the class



getSuperClass
final public ClassDeclaration getSuperClass()(Code)
Get the class' super class



getSuperClass
public ClassDeclaration getSuperClass(Environment env)(Code)
Get the super class, and resolve names now if necessary. It is only possible to resolve names at this point if we are a source class. The provision of this method at this level in the class hierarchy is dubious, but see 'getInnerClass' below. All other calls to 'getSuperClass(env)' appear in 'SourceClass'. NOTE: An older definition of this method has been moved to 'SourceClass', where it overrides this one.
See Also:   ClassDefinition.resolveTypeStructure



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



getType
final public Type getType()(Code)
Get the class' type



getUpdateMember
public MemberDefinition getUpdateMember(Environment env, Context ctx, MemberDefinition field, boolean isSuper)(Code)
Find or create an update method for a private member, or return null if this is not possible.



getVariable
public MemberDefinition getVariable(Environment env, Identifier nm, ClassDefinition source) throws AmbiguousMember, ClassNotFound(Code)
Get a field from this class. Report ambiguous fields. If no accessible field is found, this method may return an inaccessible field to allow a useful error message. getVariable now takes the source class `source' as an argument. This allows getVariable to check whether a field is inaccessible before it signals that a field is ambiguous. The compiler used to signal an ambiguity even when one of the fields involved was not accessible. (bug 4053724)



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



hasConstructor
final public boolean hasConstructor()(Code)



implementedBy
public boolean implementedBy(Environment env, ClassDeclaration c) throws ClassNotFound(Code)
Check if this class is implemented by another class



inSamePackage
final public boolean inSamePackage(ClassDeclaration c)(Code)



inSamePackage
final public boolean inSamePackage(ClassDefinition c)(Code)



inSamePackage
final public boolean inSamePackage(Identifier packageName)(Code)



inlineLocalClass
public void inlineLocalClass(Environment env)(Code)



innerClassExists
public boolean innerClassExists(Identifier nm)(Code)
While resolving import directives, the question has arisen: does a given inner class exist? If the top-level class exists, we ask it about an inner class via this method. This method looks only at the literal name of the class, and does not attempt to follow inheritance links. This is necessary, since at the time imports are being processed, inheritance links have not been resolved yet. (Thus, an import directive must always spell a class name exactly.)



isAbstract
final public boolean isAbstract()(Code)



isAnonymous
final public boolean isAnonymous()(Code)



isClass
final public boolean isClass()(Code)



isDeprecated
final public boolean isDeprecated()(Code)



isFinal
final public boolean isFinal()(Code)



isInnerClass
final public boolean isInnerClass()(Code)
Tell if the class is inner. This predicate also returns true for top-level nested types. To test for a true inner class as seen by the programmer, use !isTopLevel().



isInsideLocal
final public boolean isInsideLocal()(Code)
Tell if the class is local or inside a local class, which means it cannot be mentioned outside of its file.



isInsideLocalOrAnonymous
final public boolean isInsideLocalOrAnonymous()(Code)
Tell if the class is local or or anonymous class, or inside such a class, which means it cannot be mentioned outside of its file.



isInterface
final public boolean isInterface()(Code)
Checks



isLocal
final public boolean isLocal()(Code)



isMember
final public boolean isMember()(Code)
Tell if the class is a member of another class. This is false for package members and for block-local classes.



isPackagePrivate
final public boolean isPackagePrivate()(Code)



isPrivate
final public boolean isPrivate()(Code)



isProtected
final public boolean isProtected()(Code)



isPublic
final public boolean isPublic()(Code)



isStatic
final public boolean isStatic()(Code)
See if this is a (nested) static class.



isSynthetic
final public boolean isSynthetic()(Code)



isTopLevel
final public boolean isTopLevel()(Code)
Tell if the class is "top-level", which is either a package member, or a static member of another top-level class.



matchAnonConstructor
public MemberDefinition matchAnonConstructor(Environment env, Identifier accessPackage, Type argumentTypes) throws AmbiguousMember, ClassNotFound(Code)
A version of matchMethod to be used only for constructors when we cannot pass in a sourceClass argument. We just assert our package name. This is used only for anonymous classes, where we have to look up a (potentially) protected constructor with no valid sourceClass parameter available.



matchMethod
public MemberDefinition matchMethod(Environment env, ClassDefinition accessor, Identifier methodName, Type[] argumentTypes) throws AmbiguousMember, ClassNotFound(Code)
Lookup a method. This code implements the method lookup mechanism specified in JLS 15.11.2. This mechanism cannot be used to lookup synthetic methods.



matchMethod
public MemberDefinition matchMethod(Environment env, ClassDefinition accessor, Identifier methodName) throws AmbiguousMember, ClassNotFound(Code)
Lookup a method. This code implements the method lookup mechanism specified in JLS 15.11.2. This mechanism cannot be used to lookup synthetic methods.



mustBeAbstract
final public boolean mustBeAbstract(Environment env)(Code)
Check to see if a class must be abstract. This method replaces isAbstract(env)



noteUsedBy
public void noteUsedBy(ClassDefinition ref, long where, Environment env)(Code)
Note that this class is being used somehow by ref. Report deprecation errors, etc.



permitInlinedAccess
public boolean permitInlinedAccess(Environment env, ClassDeclaration c) throws ClassNotFound(Code)
Check if a class is entitled to inline access to a class from another class.



permitInlinedAccess
public boolean permitInlinedAccess(Environment env, MemberDefinition f) throws ClassNotFound(Code)
Check if a class is entitled to inline access to a method from another class.



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



protectedAccess
public boolean protectedAccess(Environment env, MemberDefinition f, Type accessorType) throws ClassNotFound(Code)
We know the the field is marked protected (and not public) and that the field is visible (as per canAccess). Can we access the field as ., where has the type ? Protected fields can only be accessed when the accessorType is a subclass of the current class



referencesMustNotBeFrozen
final public void referencesMustNotBeFrozen()(Code)
assertion check



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



resolveInnerClass
public Identifier resolveInnerClass(Environment env, Identifier nm)(Code)
Interpret a qualified class name, which may have further subcomponents.. Follow inheritance links, as in: class C { class N { } } class D extends C { } ... new D.N() ... Ignore outer scopes and packages.
See Also:   resolveName



resolveName
public Identifier resolveName(Environment env, Identifier name)(Code)
Look up an inner class name, from somewhere inside this class. Since supers and outers are in scope, search them too.

If no inner class is found, env.resolveName() is then called, to interpret the ambient package and import directives.

This routine operates on a "best-efforts" basis. If at some point a class is not found, the partially-resolved identifier is returned. Eventually, someone else has to try to get the ClassDefinition and diagnose the ClassNotFound.

resolveName() looks at surrounding scopes, and hence pulling in both inherited and uplevel types. By contrast, resolveInnerClass() is intended only for interpreting explicitly qualified names, and so look only at inherited types. Also, resolveName() looks for package prefixes, which appear similar to "very uplevel" outer classes.

A similar (but more complex) name-lookup process happens when field and identifier expressions denoting qualified names are type-checked. The added complexity comes from the fact that variables may occur in such names, and take precedence over class and package names.

In the expression type-checker, resolveInnerClass() is paralleled by code in FieldExpression.checkAmbigName(), which also calls ClassDefinition.getInnerClass() to interpret names of the form "OuterClass.Inner" (and also outerObject.Inner). The checking of an identifier expression that fails to be a variable is referred directly to resolveName().




resolveTypeStructure
public void resolveTypeStructure(Environment env)(Code)
We create a stub for this. Source classes do more work. Some calls from 'SourceClass.checkSupers' execute this method.
See Also:   sun.tools.javac.SourceClass.resolveTypeStructure



setError
final public void setError()(Code)
Mark this class to be erroneous.



setLocalName
public void setLocalName(Identifier name)(Code)
Set the local name of a class. Must be a local class.



setNestError
final public void setNestError()(Code)
Mark this class, and all siblings in its class nest, to be erroneous.



setOuterClass
final protected void setOuterClass(ClassDefinition outerClass)(Code)
Set the class' enclosing class. Must be done at most once.



setOuterMember
final protected void setOuterMember(MemberDefinition outerMember)(Code)
Set the class' enclosing current instance pointer. Must be done at most once.



subClassOf
public boolean subClassOf(Environment env, ClassDeclaration otherClass) throws ClassNotFound(Code)
Check if this is a sub class of another class



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



superClassOf
public boolean superClassOf(Environment env, ClassDeclaration otherClass) throws ClassNotFound(Code)
Check if this is a super class of another class



toString
public String toString()(Code)
Convert to String



turnOffInheritanceChecks
public static void turnOffInheritanceChecks()(Code)
This is a workaround to allow javadoc to turn off certain inheritance/override checks which interfere with javadoc badly. In the future it might be good to eliminate the shared sources of javadoc and javac to avoid the need for this sort of workaround.



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.