anvil.script.statements
Class ModuleStatement

java.lang.Object
  |
  +--anvil.script.statements.Statement
        |
        +--anvil.script.statements.ScopedStatement
              |
              +--anvil.script.statements.DefinitionStatement
                    |
                    +--anvil.script.statements.ModuleStatement
All Implemented Interfaces:
CodecConstants, Module, Scope, Type

public class ModuleStatement
extends DefinitionStatement
implements Module, CodecConstants

class ModuleStatement


Field Summary
 
Fields inherited from class anvil.script.statements.DefinitionStatement
_contentstate, _descriptor, _document, _externals, _imports, _name, _parent, _parents, _private, _taglibs, _types
 
Fields inherited from class anvil.script.statements.Statement
CONTENT_COMPRESS, CONTENT_PACK, CONTENT_PRESERVE, CONTENT_PROCESSING, CONTENT_SILENT, DEFAULT_NAMESPACE, EMPTY, ST_ASSERT, ST_BLOCK, ST_BREAK, ST_CALL, ST_CASE, ST_CATCH, ST_CDATA, ST_CLASS, ST_COMPRESS, ST_CONST, ST_CONTINUE, ST_CUSTOM_TAG, ST_DEFAULT, ST_DO, ST_DOCUMENT, ST_ELSE, ST_ELSEIF, ST_ENDCASE, ST_ENDCLASS, ST_ENDCONST, ST_ENDDEFAULT, ST_ENDEVAL, ST_ENDFOR, ST_ENDFOREACH, ST_ENDFUNCTION, ST_ENDIF, ST_ENDINNER, ST_ENDMODULE, ST_ENDNAMESPACE, ST_ENDOUTER, ST_ENDREPLACE, ST_ENDSWITCH, ST_ENDVAR, ST_ENDWHILE, ST_EVAL, ST_EXIT, ST_FINALLY, ST_FOR, ST_FOREACH, ST_FUNCTION, ST_IF, ST_IMPLICIT_BLOCK, ST_IMPORT, ST_INNER, ST_INTERFACE, ST_INVALID, ST_INVOKE, ST_MODULE, ST_NAMESPACE, ST_NONE, ST_OUTER, ST_PACK, ST_PRESERVE, ST_PRINT, ST_REPLACE, ST_RETURN, ST_SILENT, ST_SWITCH, ST_SYNCHRONIZED, ST_TAG, ST_THROW, ST_TRY, ST_VAR, ST_WHILE, ST_YIELD
 
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
 
Fields inherited from interface anvil.codec.CodecConstants
ACC_ABSTRACT, ACC_FINAL, ACC_INTERFACE, ACC_NATIVE, ACC_PRIVATE, ACC_PROTECTED, ACC_PUBLIC, ACC_STATIC, ACC_STRICT, ACC_SUPER, ACC_SYNCHRONIZED, ACC_TRANSIENT, ACC_VOLATILE, ATTR_Code, ATTR_ConstantValue, ATTR_Deprecated, ATTR_Exceptions, ATTR_InnerClasses, ATTR_LineNumberTable, ATTR_LocalVariableTable, ATTR_SourceFile, ATTR_Synthetic, CLASS_MAGIC, CONSTANT_Class, CONSTANT_Double, CONSTANT_FieldRef, CONSTANT_Float, CONSTANT_Integer, CONSTANT_InterfaceMethodRef, CONSTANT_Long, CONSTANT_MethodRef, CONSTANT_NameAndType, CONSTANT_SourceFile, CONSTANT_String, CONSTANT_Utf8, MAJOR_VERSION, MINOR_VERSION, T_BOOLEAN, T_BYTE, T_CHAR, T_DOUBLE, T_FLOAT, T_INT, T_LONG, T_SHORT
 
Constructor Summary
ModuleStatement(ModuleEnvelope envelope, java.lang.String name, Modifiers mods)
           
 
Method Summary
 void addDependency(Import imprt)
           
 void check(ErrorListener context)
           
 void compile(ByteCompiler context)
           
 void compileConstructor(ByteCompiler context)
           
 void compileInit(ByteCompiler context)
           
 void compileStaticInit(ByteCompiler context)
           
 VariableStatement declare(java.lang.String name, Expression expr, Modifiers mods)
           
 Address getAddress()
           
 Method getConstructor()
           
 java.util.Iterator getDependencies()
           
 Dependency getDependency(Address address)
           
 ModuleEnvelope getEnvelope()
           
 int getNextInlined()
           
 Scope getParent()
           
 java.lang.String getPathinfo()
           
 java.lang.String getQualifiedName()
           
 int getType()
           
 java.net.URL getURL()
           
 void init(Context context)
           
 boolean isStaticRegion()
           
 Type lookupDeclaration(java.lang.String name)
           
 java.lang.String name()
           
 void onCharacters(TemplateParser parser, java.lang.String cdata)
           
 boolean onTag(TemplateParser parser, int type, Tag tag)
           
 void parse(TemplateParser parser, Tag tag)
           
 void setPragma(ErrorListener listener, Location location, java.lang.String type, boolean enable)
           
 int typeOf()
           
 
Methods inherited from class anvil.script.statements.DefinitionStatement
addEntityImport, addExternal, addExternal, addExternals, addHrefImport, addImport, addTaglib, compileMembers, declare, declare, follow, getContentState, getDeclarations, getDescriptor, getDocument, getModifiers, getName, getName, getParentDefinition, getParents, getTag, getTypeRef, importExternals, isEntityReserved, isPrivate, lookupLocalDeclaration, onClass, onConst, onFunction, onImport, onNamespace, onVar, setContentState, toString, toString
 
Methods inherited from class anvil.script.statements.ScopedStatement
hasEnd, isBlocked, parseCondition
 
Methods inherited from class anvil.script.statements.Statement
addChild, allowBreak, allowContinue, allowLabel, allowYield, callFinalizer, compress, eliminate, getBlockStatement, getCatchStatement, getChildStatement, getClassStatement, getDefinitionStatement, getFunctionStatement, getInterfaceStatement, getLabelDepth, getLabeled, getLocation, getModuleStatement, getParentStatement, getScopeStatement, getStaticContent, getSwitch, getTagId, getTypeRef, hasStaticContent, isDeclared, lookupAnyDeclaration, onProcessingInstruction, pack, parseLabel, setChildStatement, setLocation, setParentStatement
 
Methods inherited from class java.lang.Object
clone, equals, finalize, getClass, hashCode, notify, notifyAll, wait, wait, wait
 
Methods inherited from interface anvil.script.Module
getDescriptor
 
Methods inherited from interface anvil.script.Scope
getDeclarations
 
Methods inherited from interface anvil.script.Type
getDocument, getName, getParents, getTypeRef, isPrivate
 

Constructor Detail

ModuleStatement

public ModuleStatement(ModuleEnvelope envelope,
                       java.lang.String name,
                       Modifiers mods)
Method Detail

typeOf

public int typeOf()
Overrides:
typeOf in class Statement

name

public java.lang.String name()
Overrides:
name in class Statement

getType

public int getType()
Specified by:
getType in interface Type

getParent

public Scope getParent()
Specified by:
getParent in interface Type
Overrides:
getParent in class DefinitionStatement

getQualifiedName

public java.lang.String getQualifiedName()
Specified by:
getQualifiedName in interface Type
Overrides:
getQualifiedName in class DefinitionStatement

addDependency

public void addDependency(Import imprt)

getDependencies

public java.util.Iterator getDependencies()
Specified by:
getDependencies in interface Module

getDependency

public Dependency getDependency(Address address)
Specified by:
getDependency in interface Module

getEnvelope

public ModuleEnvelope getEnvelope()

getURL

public java.net.URL getURL()
Specified by:
getURL in interface Module

getAddress

public Address getAddress()
Specified by:
getAddress in interface Module

getPathinfo

public java.lang.String getPathinfo()
Specified by:
getPathinfo in interface Module

getNextInlined

public int getNextInlined()
Overrides:
getNextInlined in class DefinitionStatement

isStaticRegion

public boolean isStaticRegion()
Overrides:
isStaticRegion in class Statement

setPragma

public void setPragma(ErrorListener listener,
                      Location location,
                      java.lang.String type,
                      boolean enable)

lookupDeclaration

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

declare

public VariableStatement declare(java.lang.String name,
                                 Expression expr,
                                 Modifiers mods)
Overrides:
declare in class DefinitionStatement

parse

public void parse(TemplateParser parser,
                  Tag tag)
Overrides:
parse in class DefinitionStatement

check

public void check(ErrorListener context)
Overrides:
check in class DefinitionStatement

init

public final void init(Context context)

onCharacters

public void onCharacters(TemplateParser parser,
                         java.lang.String cdata)
Overrides:
onCharacters in class Statement

onTag

public boolean onTag(TemplateParser parser,
                     int type,
                     Tag tag)
Overrides:
onTag in class DefinitionStatement

getConstructor

public Method getConstructor()

compileConstructor

public void compileConstructor(ByteCompiler context)

compileStaticInit

public void compileStaticInit(ByteCompiler context)

compileInit

public void compileInit(ByteCompiler context)

compile

public void compile(ByteCompiler context)
Overrides:
compile in class DefinitionStatement