anvil.script.statements
Class MemberVariableStatement

java.lang.Object
  |
  +--anvil.script.statements.Statement
        |
        +--anvil.script.statements.VariableStatement
              |
              +--anvil.script.statements.MemberVariableStatement
All Implemented Interfaces:
ClassMember, MemberVariableType, Type, VariableType

public class MemberVariableStatement
extends VariableStatement
implements MemberVariableType

class MemberVariableStatement


Field Summary
protected  ClassType _classtype
           
 
Fields inherited from class anvil.script.statements.VariableStatement
_content, _contentlocation, _document, _expression, _hasconstantinit, _name, _parent, _parents, _private, _value
 
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
 
Constructor Summary
MemberVariableStatement(ClassStatement clazz, java.lang.String name, Expression expr, Modifiers mods)
           
 
Method Summary
 void compile(ByteCompiler context)
           
 Expression createInitializer()
           
 Expression createStaticInitializer()
           
 ClassType getClassType()
           
 int getType()
           
 int getTypeRef(ConstantPool pool)
           
 Any getValue(java.lang.Object self)
           
 boolean isStaticRegion()
           
 boolean onTag(TemplateParser parser, int type, Tag tag)
           
 Any setValue(java.lang.Object self, Any value)
           
 
Methods inherited from class anvil.script.statements.VariableStatement
check, getDocument, getExpression, getName, getParent, getParents, getParentStatement, getQualifiedName, getValue, hasConstantInitializer, isPrivate, onCharacters, setExpression, setValue, toString, typeOf
 
Methods inherited from class anvil.script.statements.Statement
addChild, allowBreak, allowContinue, allowLabel, allowYield, callFinalizer, compress, eliminate, getBlockStatement, getCatchStatement, getChildStatement, getClassStatement, getContentState, getDefinitionStatement, getFunctionStatement, getInterfaceStatement, getLabelDepth, getLabeled, getLocation, getModuleStatement, getScopeStatement, getStaticContent, getSwitch, getTag, getTagId, getTypeRef, hasEnd, hasStaticContent, importExternals, isBlocked, isDeclared, lookupAnyDeclaration, name, onProcessingInstruction, pack, parse, 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.MemberVariableType
isPrivate
 
Methods inherited from interface anvil.script.VariableType
getValue, hasConstantInitializer, setValue
 
Methods inherited from interface anvil.script.Type
getDocument, getName, getParent, getParents, getQualifiedName
 

Field Detail

_classtype

protected ClassType _classtype
Constructor Detail

MemberVariableStatement

public MemberVariableStatement(ClassStatement clazz,
                               java.lang.String name,
                               Expression expr,
                               Modifiers mods)
Method Detail

getType

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

getClassType

public ClassType getClassType()
Specified by:
getClassType in interface ClassMember

isStaticRegion

public boolean isStaticRegion()
Overrides:
isStaticRegion in class Statement

onTag

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

getTypeRef

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

createStaticInitializer

public Expression createStaticInitializer()
Overrides:
createStaticInitializer in class VariableStatement

createInitializer

public Expression createInitializer()
Overrides:
createInitializer in class VariableStatement

compile

public void compile(ByteCompiler context)
Specified by:
compile in class VariableStatement

getValue

public Any getValue(java.lang.Object self)
Specified by:
getValue in interface MemberVariableType

setValue

public Any setValue(java.lang.Object self,
                    Any value)
Specified by:
setValue in interface MemberVariableType