Java Doc for JavaExternalAnalyzer.java in  » Parser » Rats-Parser-Generators » xtc » lang » 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 » Parser » Rats Parser Generators » xtc.lang 
Source Cross Reference  Class Diagram Java Document (Java Doc) 


java.lang.Object
   xtc.tree.Visitor
      xtc.lang.JavaExternalAnalyzer

JavaExternalAnalyzer
public class JavaExternalAnalyzer extends Visitor (Code)
A visitor that constructs externally visible types and fills the symbol table for a Java file. Does not descend into method bodies, just finds the class, interface, method, and field signatures. Used in conjunction with JavaAnalyzer. Let F be the file currently analyzed by the JavaAnalyzer; then the JavaExternalAnalyzer is used on (i) classes defined in F, and (ii) compilation units that define classes whose name gets used in F. Packages, classes, and interfaces go into namespace "tag(..)", methods go into namespace "method(..)", and fields go into the default namespace. The scopes associated with packages and types do not have the namespace in their name, only the symbols do. For example, scope "java" contains scope "lang", but scope "java" maps symbol "tag(lang)" to an instance of PackageT. Declared types are represented by instances of ClassT or InterfaceT, whereas names used, for example, as method return types are represented by instances of AliasT.
author:
   Martin Hirzel
version:
   $Revision: 1.71 $


Field Summary
protected static  List<Attribute>MODIFIERS_CLASS
    
protected static  List<Attribute>MODIFIERS_CONSTRUCTOR
    
protected static  List<Attribute>MODIFIERS_FIELD
    
protected static  List<Attribute>MODIFIERS_INTERFACE
    
protected static  List<Attribute>MODIFIERS_INTERFACE_FIELD
    
protected static  List<Attribute>MODIFIERS_INTERFACE_MEMBERTYPE
    
protected static  List<Attribute>MODIFIERS_INTERFACE_METHOD
    
protected static  List<Attribute>MODIFIERS_METHOD
    
final protected  Runtime_runtime
    
final public  SymbolTable_table
    

Constructor Summary
public  JavaExternalAnalyzer(Runtime runtime, SymbolTable table)
    

Method Summary
protected static  voidaddModifier(List<Attribute> modifiers, String name)
    
protected static  voidaddModifiers(List<Attribute> modifiers, List<Attribute> toAdd)
    
protected  booleanassrt(GNode n, boolean cond, String msgFormat, Object... msgArgs)
     Use this for asserting that the input is typed correctly.
protected  voidassrtDiffersFromEnclosing(GNode n, String canonicalName)
    
protected  voidassrtLegalModifiers(GNode n, List<Attribute> expected, List<Attribute> actual, String context)
    
public static  intcountDimensions(GNode dimNode)
    
final protected  StringcurrentScopeName()
    
final protected  TypedeclareDefaultConstructorIfNecessary()
    
protected static  booleanhasModifier(List<Attribute> modifiers, String modifier)
    
final protected  List<Type>makeList(GNode n)
    
final protected  booleanmemberOfInterface()
    
final public  List<Type>processDeclarators(List<Attribute> modifiers, Type type, GNode declarators)
    
final public  voidvisitBlockDeclaration(GNode n)
     Visit a BlockDeclaration = ["static"] Block (gosling_et_al_2000 §8.6, §8.7).
final public  voidvisitClassBody(GNode n)
     Visit a ClassBody = Declaration* (gosling_et_al_2000 §8.1.5, §9.1.3, §15.9).
final public  ClassTvisitClassDeclaration(GNode n)
     Visit a ClassDeclaration = Modifiers Identifier null [Extension] [Implementation] ClassBody (gosling_et_al_2000 §8.1, §14.3).
final public  voidvisitCompilationUnit(GNode n)
     Visit a CompilationUnit = [PackageDeclaration] ImportDeclaration* Declaration* (gosling_et_al_2000 §7.3).
final public  voidvisitEmptyDeclaration(GNode n)
     Visit a EmptyDeclaration = (no children) (gosling_et_al_2000 §14.6).
final public  List<Type>visitExtension(GNode n)
     Visit an Extension = Type+.
final public  List<Type>visitFieldDeclaration(GNode n)
     Visit a FieldDeclaration = Modifiers Type Declarators.
final public  TypevisitFormalParameter(GNode n)
     Visit a FormalParameter = [Modifier] Type null Identifier [Dimensions].
final public  List<Type>visitFormalParameters(GNode n)
     Visit a FormalParameters = FormalParameter*.
final public  List<Type>visitImplementation(GNode n)
     Visit an Implementation = Type+.
final public  voidvisitImportDeclaration(GNode n)
     Visit an ImportDeclaration = QualifiedIdentifier ["*"].
final public  InterfaceTvisitInterfaceDeclaration(GNode n)
     Visit a InterfaceDeclaration = Modifiers Identifier null [Extension] ClassBody.
final public  TypevisitMethodDeclaration(GNode n)
     Visit a MethodDeclaration = Modifiers null Type Identifier FormalParameters [Dimensions] [ThrowsClause] [Block].
final public  List<Attribute>visitModifiers(GNode n)
     Visit a Modifiers = Modifier*.
final public  PackageTvisitPackageDeclaration(GNode n)
     Visit a PackageDeclaration = QualifiedIdentifier.
final public  TypevisitPrimitiveType(GNode n)
     Visit a PrimitiveType = ("byte" / "short" / "char" / "int" / "long" / "float" / "double" / "boolean") (gosling_et_al_2000 §4.2).
final public  StringvisitQualifiedIdentifier(GNode n)
     Visit a QualifiedIdentifier = Identifier+.
final public  List<Type>visitThrowsClause(GNode n)
     Visit a ThrowsClause = QualifiedIdentifier+.
final public  TypevisitType(GNode n)
     Visit a Type = TypeName Dimensions (gosling_et_al_2000 §4, §10.1). Note that TypeName is either PrimitiveType or ClassType, i.e., QualifiedIdentifier. Make no resolution attempt in the case of a qualified identifier, just return an alias every time.
final public  TypevisitVoidType(GNode n)
     Visit a VoidType = (no children).

Field Detail
MODIFIERS_CLASS
protected static List<Attribute> MODIFIERS_CLASS(Code)



MODIFIERS_CONSTRUCTOR
protected static List<Attribute> MODIFIERS_CONSTRUCTOR(Code)



MODIFIERS_FIELD
protected static List<Attribute> MODIFIERS_FIELD(Code)



MODIFIERS_INTERFACE
protected static List<Attribute> MODIFIERS_INTERFACE(Code)



MODIFIERS_INTERFACE_FIELD
protected static List<Attribute> MODIFIERS_INTERFACE_FIELD(Code)



MODIFIERS_INTERFACE_MEMBERTYPE
protected static List<Attribute> MODIFIERS_INTERFACE_MEMBERTYPE(Code)



MODIFIERS_INTERFACE_METHOD
protected static List<Attribute> MODIFIERS_INTERFACE_METHOD(Code)



MODIFIERS_METHOD
protected static List<Attribute> MODIFIERS_METHOD(Code)



_runtime
final protected Runtime _runtime(Code)



_table
final public SymbolTable _table(Code)




Constructor Detail
JavaExternalAnalyzer
public JavaExternalAnalyzer(Runtime runtime, SymbolTable table)(Code)




Method Detail
addModifier
protected static void addModifier(List<Attribute> modifiers, String name)(Code)



addModifiers
protected static void addModifiers(List<Attribute> modifiers, List<Attribute> toAdd)(Code)



assrt
protected boolean assrt(GNode n, boolean cond, String msgFormat, Object... msgArgs)(Code)
Use this for asserting that the input is typed correctly.



assrtDiffersFromEnclosing
protected void assrtDiffersFromEnclosing(GNode n, String canonicalName)(Code)



assrtLegalModifiers
protected void assrtLegalModifiers(GNode n, List<Attribute> expected, List<Attribute> actual, String context)(Code)



countDimensions
public static int countDimensions(GNode dimNode)(Code)



currentScopeName
final protected String currentScopeName()(Code)



declareDefaultConstructorIfNecessary
final protected Type declareDefaultConstructorIfNecessary()(Code)



hasModifier
protected static boolean hasModifier(List<Attribute> modifiers, String modifier)(Code)



makeList
final protected List<Type> makeList(GNode n)(Code)



memberOfInterface
final protected boolean memberOfInterface()(Code)



processDeclarators
final public List<Type> processDeclarators(List<Attribute> modifiers, Type type, GNode declarators)(Code)



visitBlockDeclaration
final public void visitBlockDeclaration(GNode n)(Code)
Visit a BlockDeclaration = ["static"] Block (gosling_et_al_2000 §8.6, §8.7).



visitClassBody
final public void visitClassBody(GNode n)(Code)
Visit a ClassBody = Declaration* (gosling_et_al_2000 §8.1.5, §9.1.3, §15.9).



visitClassDeclaration
final public ClassT visitClassDeclaration(GNode n)(Code)
Visit a ClassDeclaration = Modifiers Identifier null [Extension] [Implementation] ClassBody (gosling_et_al_2000 §8.1, §14.3).



visitCompilationUnit
final public void visitCompilationUnit(GNode n)(Code)
Visit a CompilationUnit = [PackageDeclaration] ImportDeclaration* Declaration* (gosling_et_al_2000 §7.3).



visitEmptyDeclaration
final public void visitEmptyDeclaration(GNode n)(Code)
Visit a EmptyDeclaration = (no children) (gosling_et_al_2000 §14.6).



visitExtension
final public List<Type> visitExtension(GNode n)(Code)
Visit an Extension = Type+.



visitFieldDeclaration
final public List<Type> visitFieldDeclaration(GNode n)(Code)
Visit a FieldDeclaration = Modifiers Type Declarators. Also descends into Declarators = Declarator+ and into Declarator = Identifier [Dimensions] [VariableInitializer] to get all the fields declared by this node.



visitFormalParameter
final public Type visitFormalParameter(GNode n)(Code)
Visit a FormalParameter = [Modifier] Type null Identifier [Dimensions].



visitFormalParameters
final public List<Type> visitFormalParameters(GNode n)(Code)
Visit a FormalParameters = FormalParameter*.



visitImplementation
final public List<Type> visitImplementation(GNode n)(Code)
Visit an Implementation = Type+.



visitImportDeclaration
final public void visitImportDeclaration(GNode n)(Code)
Visit an ImportDeclaration = QualifiedIdentifier ["*"].



visitInterfaceDeclaration
final public InterfaceT visitInterfaceDeclaration(GNode n)(Code)
Visit a InterfaceDeclaration = Modifiers Identifier null [Extension] ClassBody.



visitMethodDeclaration
final public Type visitMethodDeclaration(GNode n)(Code)
Visit a MethodDeclaration = Modifiers null Type Identifier FormalParameters [Dimensions] [ThrowsClause] [Block].



visitModifiers
final public List<Attribute> visitModifiers(GNode n)(Code)
Visit a Modifiers = Modifier*.



visitPackageDeclaration
final public PackageT visitPackageDeclaration(GNode n)(Code)
Visit a PackageDeclaration = QualifiedIdentifier.



visitPrimitiveType
final public Type visitPrimitiveType(GNode n)(Code)
Visit a PrimitiveType = ("byte" / "short" / "char" / "int" / "long" / "float" / "double" / "boolean") (gosling_et_al_2000 §4.2).



visitQualifiedIdentifier
final public String visitQualifiedIdentifier(GNode n)(Code)
Visit a QualifiedIdentifier = Identifier+.



visitThrowsClause
final public List<Type> visitThrowsClause(GNode n)(Code)
Visit a ThrowsClause = QualifiedIdentifier+.



visitType
final public Type visitType(GNode n)(Code)
Visit a Type = TypeName Dimensions (gosling_et_al_2000 §4, §10.1). Note that TypeName is either PrimitiveType or ClassType, i.e., QualifiedIdentifier. Make no resolution attempt in the case of a qualified identifier, just return an alias every time. The reason is that in general, there is too little information to resolve the type at this point. For example, the name may refer to a type declared in another file, which may recursively mention an entity in this file.



visitVoidType
final public Type visitVoidType(GNode n)(Code)
Visit a VoidType = (no children).



Methods inherited from xtc.tree.Visitor
public Object dispatch(Node node)(Code)(Java Doc)

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

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