anvil.script.statements
Class ClassStatement
java.lang.Object
|
+--anvil.script.statements.Statement
|
+--anvil.script.statements.ScopedStatement
|
+--anvil.script.statements.DefinitionStatement
|
+--anvil.script.statements.ClassStatement
- All Implemented Interfaces:
- ClassType, Scope, Type
- public class ClassStatement
- extends DefinitionStatement
- implements ClassType
class ClassStatement
| 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 |
|
Method Summary |
void |
check(ErrorListener context)
|
protected void |
checkMethod(ErrorListener listener,
MethodStatement method,
int params)
|
protected void |
checkMethod(ErrorListener listener,
java.lang.String name,
int params)
|
protected void |
checkPrefixedMethods(ErrorListener listener,
java.lang.String prefix,
int params)
|
void |
compile(ByteCompiler context)
|
VariableStatement |
declare(java.lang.String name,
Expression expr,
Modifiers mods)
|
void |
declare(Type type)
|
void |
finish()
|
ClassRef |
getBase()
|
ClassType |
getBaseClass()
|
protected CompilableFunction |
getBaseClassConstructor()
|
ConstructorType |
getConstructor()
|
int |
getConstructorReference(ConstantPool pool)
|
ClassDispatcher |
getDispatcher(Context context)
|
ClassType[] |
getEnclosingClasses()
|
InterfaceRef[] |
getInterfaces()
|
int |
getNextInlined()
|
java.lang.String |
getPathinfo()
|
int |
getType()
|
protected void |
init()
|
boolean |
isEntityReserved(java.lang.String name)
|
boolean |
isInnerClass()
|
boolean |
isInstanceOf(Type ofType)
|
boolean |
isStaticRegion()
|
Type |
lookupDeclaration(java.lang.String name)
|
Type |
lookupInheritedDeclaration(java.lang.String name)
|
java.lang.String |
name()
|
Any |
newInstance()
|
void |
onCharacters(TemplateParser parser,
java.lang.String cdata)
|
protected void |
onFunction(TemplateParser parser,
int type,
Tag tag)
|
boolean |
onTag(TemplateParser parser,
int type,
Tag tag)
|
void |
parse(TemplateParser parser,
Tag tag)
|
int |
typeOf()
|
| Methods inherited from class anvil.script.statements.DefinitionStatement |
addEntityImport, addExternal, addExternal, addExternals, addHrefImport, addImport, addTaglib, compileMembers, declare, follow, getContentState, getDeclarations, getDescriptor, getDocument, getModifiers, getName, getName, getParent, getParentDefinition, getParents, getQualifiedName, getTag, getTypeRef, importExternals, isPrivate, lookupLocalDeclaration, onClass, onConst, onImport, onNamespace, onVar, setContentState, toString, toString |
| 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 |
_parents
protected ClassType[] _parents
_constructor_signature
protected java.lang.String _constructor_signature
_base
protected ClassRef _base
_interfaces
protected InterfaceRef[] _interfaces
_constructor
protected ConstructorStatement _constructor
_inlinecount
protected int _inlinecount
ClassStatement
public ClassStatement(DefinitionStatement parent,
java.lang.String name,
Modifiers mods)
ClassStatement
public ClassStatement(DefinitionStatement parent,
java.lang.String name,
ClassRef base,
InterfaceRef[] interfaces,
Modifiers mods)
init
protected void init()
parse
public void parse(TemplateParser parser,
Tag tag)
- Overrides:
parse in class DefinitionStatement
getEnclosingClasses
public ClassType[] getEnclosingClasses()
- Specified by:
getEnclosingClasses in interface ClassType
typeOf
public int typeOf()
- Overrides:
typeOf in class Statement
name
public java.lang.String name()
- Overrides:
name in class Statement
getConstructorReference
public int getConstructorReference(ConstantPool pool)
- Specified by:
getConstructorReference in interface ClassType
getType
public int getType()
- Specified by:
getType in interface Type
getPathinfo
public java.lang.String getPathinfo()
- Specified by:
getPathinfo in interface ClassType
isInstanceOf
public boolean isInstanceOf(Type ofType)
- Specified by:
isInstanceOf in interface ClassType
isInnerClass
public boolean isInnerClass()
getBase
public ClassRef getBase()
- Specified by:
getBase in interface ClassType
getBaseClass
public ClassType getBaseClass()
- Specified by:
getBaseClass in interface ClassType
getInterfaces
public InterfaceRef[] getInterfaces()
- Specified by:
getInterfaces in interface ClassType
getConstructor
public ConstructorType getConstructor()
- Specified by:
getConstructor in interface ClassType
newInstance
public Any newInstance()
- Specified by:
newInstance in interface ClassType
isStaticRegion
public boolean isStaticRegion()
- Overrides:
isStaticRegion in class Statement
getNextInlined
public int getNextInlined()
- Overrides:
getNextInlined in class DefinitionStatement
getDispatcher
public ClassDispatcher getDispatcher(Context context)
- Specified by:
getDispatcher in interface ClassType
declare
public void declare(Type type)
- Overrides:
declare in class DefinitionStatement
declare
public VariableStatement declare(java.lang.String name,
Expression expr,
Modifiers mods)
- Overrides:
declare in class DefinitionStatement
isEntityReserved
public boolean isEntityReserved(java.lang.String name)
- Overrides:
isEntityReserved in class DefinitionStatement
lookupDeclaration
public Type lookupDeclaration(java.lang.String name)
- Specified by:
lookupDeclaration in interface Scope- Overrides:
lookupDeclaration in class DefinitionStatement
lookupInheritedDeclaration
public Type lookupInheritedDeclaration(java.lang.String name)
- Specified by:
lookupInheritedDeclaration in interface ClassType
getBaseClassConstructor
protected CompilableFunction getBaseClassConstructor()
onFunction
protected void onFunction(TemplateParser parser,
int type,
Tag tag)
- Overrides:
onFunction in class DefinitionStatement
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
finish
public void finish()
check
public void check(ErrorListener context)
- Overrides:
check in class DefinitionStatement
checkMethod
protected void checkMethod(ErrorListener listener,
java.lang.String name,
int params)
checkPrefixedMethods
protected void checkPrefixedMethods(ErrorListener listener,
java.lang.String prefix,
int params)
checkMethod
protected void checkMethod(ErrorListener listener,
MethodStatement method,
int params)
compile
public void compile(ByteCompiler context)
- Overrides:
compile in class DefinitionStatement