anvil.script.compiler
Class CompiledScope

java.lang.Object
  |
  +--anvil.script.compiler.Compiled
        |
        +--anvil.script.compiler.CompiledScope
All Implemented Interfaces:
Scope, Type
Direct Known Subclasses:
CompiledClassType, CompiledInterfaceType, CompiledModule, CompiledNamespace

public abstract class CompiledScope
extends Compiled
implements Scope

class Compiled


Field Summary
protected  java.lang.Class _class
           
protected  java.lang.String _descriptor
           
protected  SymbolTable _types
           
 
Fields inherited from class anvil.script.compiler.Compiled
_document, _name, _parent, _parents, _private, _qname
 
Fields inherited from interface anvil.script.Type
CLASS, CONSTANT_VARIABLE, CONSTRUCTOR, FUNCTION, FUNCTION_PARAMETER, GLOBAL_NAMESPACE, IMPORT, INTERFACE, INTERFACE_METHOD, LOCAL_VARIABLE, MEMBER_VARIABLE, METHOD, MODULE, NAMESPACE, SCOPE0, STATIC_VARIABLE, SYSTEM_NAMESPACE, TYPE_NAMES
 
Constructor Summary
CompiledScope(Scope parent, java.lang.Class clazz, java.lang.String name, Doc document, boolean privat)
           
 
Method Summary
 java.lang.String buildQualifiedName()
           
protected  void declare(java.lang.String name, Type type)
           
protected  void declare(Type type)
           
 java.util.Iterator getDeclarations()
           
 java.lang.String getDescriptor()
           
 CompiledModule getModule()
           
 int getTypeRef(ConstantPool pool)
           
protected  void initializeMembers(java.lang.ClassLoader classloader)
           
 Type lookupDeclaration(java.lang.String name)
           
protected  ClassType onClass(java.lang.ClassLoader classloader, java.lang.Class cls, java.lang.String name, Doc doc, boolean privat)
           
protected  ConstantVariableType onConstantVariable(java.lang.reflect.Field field, java.lang.String name, Doc doc, boolean privat)
           
protected  MethodType onConstructor(java.lang.reflect.Method method, java.lang.reflect.Constructor constructor, java.lang.String name, java.lang.Object[] parameters, Doc doc, boolean privat)
           
protected  CompilableFunction onFunction(java.lang.reflect.Method method, java.lang.String name, java.lang.Object[] parameters, Doc doc, boolean privat)
           
protected  InterfaceType onInterface(java.lang.ClassLoader classloader, java.lang.Class cls, java.lang.String name, Doc doc, boolean privat)
           
protected  MethodType onInterfaceMethod(java.lang.reflect.Method method, java.lang.String name, java.lang.Object[] parameters, Doc doc)
           
protected  MemberVariableType onMemberVariable(java.lang.reflect.Field field, java.lang.String name, Doc doc, boolean privat)
           
protected  MethodType onMethod(java.lang.reflect.Method method, java.lang.String name, java.lang.Object[] parameters, Doc doc, boolean privat)
           
protected  Scope onNamespace(java.lang.ClassLoader classloader, java.lang.Class cls, java.lang.String name, Doc doc, boolean privat)
           
protected  void onScript(java.lang.String name, Doc doc)
           
protected  StaticVariableType onStaticVariable(java.lang.reflect.Field field, java.lang.String name, Doc doc, boolean privat)
           
 
Methods inherited from class anvil.script.compiler.Compiled
findClass, findInterface, findMethod, findNamespace, getDocument, getfield, getName, getParent, getParents, getQualifiedName, getstatic, getstatic, getType, isPrivate, putfield, putstatic, putstatic, toString, toString
 
Methods inherited from class java.lang.Object
clone, equals, finalize, getClass, hashCode, notify, notifyAll, wait, wait, wait
 
Methods inherited from interface anvil.script.Type
getDocument, getName, getParent, getParents, getQualifiedName, getType, isPrivate
 

Field Detail

_types

protected SymbolTable _types

_class

protected java.lang.Class _class

_descriptor

protected java.lang.String _descriptor
Constructor Detail

CompiledScope

public CompiledScope(Scope parent,
                     java.lang.Class clazz,
                     java.lang.String name,
                     Doc document,
                     boolean privat)
Method Detail

initializeMembers

protected void initializeMembers(java.lang.ClassLoader classloader)

onScript

protected void onScript(java.lang.String name,
                        Doc doc)

onNamespace

protected Scope onNamespace(java.lang.ClassLoader classloader,
                            java.lang.Class cls,
                            java.lang.String name,
                            Doc doc,
                            boolean privat)

onClass

protected ClassType onClass(java.lang.ClassLoader classloader,
                            java.lang.Class cls,
                            java.lang.String name,
                            Doc doc,
                            boolean privat)

onInterface

protected InterfaceType onInterface(java.lang.ClassLoader classloader,
                                    java.lang.Class cls,
                                    java.lang.String name,
                                    Doc doc,
                                    boolean privat)

onFunction

protected CompilableFunction onFunction(java.lang.reflect.Method method,
                                        java.lang.String name,
                                        java.lang.Object[] parameters,
                                        Doc doc,
                                        boolean privat)

onMethod

protected MethodType onMethod(java.lang.reflect.Method method,
                              java.lang.String name,
                              java.lang.Object[] parameters,
                              Doc doc,
                              boolean privat)

onInterfaceMethod

protected MethodType onInterfaceMethod(java.lang.reflect.Method method,
                                       java.lang.String name,
                                       java.lang.Object[] parameters,
                                       Doc doc)

onConstructor

protected MethodType onConstructor(java.lang.reflect.Method method,
                                   java.lang.reflect.Constructor constructor,
                                   java.lang.String name,
                                   java.lang.Object[] parameters,
                                   Doc doc,
                                   boolean privat)

onConstantVariable

protected ConstantVariableType onConstantVariable(java.lang.reflect.Field field,
                                                  java.lang.String name,
                                                  Doc doc,
                                                  boolean privat)

onStaticVariable

protected StaticVariableType onStaticVariable(java.lang.reflect.Field field,
                                              java.lang.String name,
                                              Doc doc,
                                              boolean privat)

onMemberVariable

protected MemberVariableType onMemberVariable(java.lang.reflect.Field field,
                                              java.lang.String name,
                                              Doc doc,
                                              boolean privat)

lookupDeclaration

public Type lookupDeclaration(java.lang.String name)
Specified by:
lookupDeclaration in interface Scope

getDeclarations

public final java.util.Iterator getDeclarations()
Specified by:
getDeclarations in interface Scope

declare

protected final void declare(Type type)

declare

protected final void declare(java.lang.String name,
                             Type type)

getTypeRef

public int getTypeRef(ConstantPool pool)
Specified by:
getTypeRef in interface Type
Specified by:
getTypeRef in class Compiled

getDescriptor

public java.lang.String getDescriptor()

getModule

public CompiledModule getModule()

buildQualifiedName

public java.lang.String buildQualifiedName()