Package net.janino.IClass

Examples of net.janino.IClass.IField


                this.value = new ArrayLength(
                    this.getLocation(),
                    this.lhs.toRvalueOrCE()
                );
            } else {
                IField iField = Java.findIField(lhsType, this.fieldName, this.getLocation());
                if (iField == null) {
                    this.compileError("\"" + this.lhs.getType().toString() + "\" has no field \"" + this.fieldName + "\"");
                    this.value = new Rvalue(this.getLocation()) {
                        public IClass compileGet() throws CompileException { return Java.getIClassLoader().OBJECT; }
                        public IClass getType() throws CompileException { return Java.getIClassLoader().OBJECT; }
View Full Code Here


        public IClass.IField[] getIFields() {
            IClass.IField[] res = new IClass.IField[this.variableDeclarators.length];
            for (int i = 0; i < res.length; ++i) {
                final VariableDeclarator vd = this.variableDeclarators[i];
                res[i] = this.declaringType.new IField() {

                    // Implement IMember.
                    public int getAccess() {
                        switch (FieldDeclarator.this.modifiers & Mod.PPP) {
                        case Mod.PRIVATE:
View Full Code Here

                if (icd == null) {
                    return new LocalVariableAccess(location, lv);
                } else {
                    if (!lv.finaL) Java.compileError("Cannot access non-final local variable \"" + identifier + "\" from inner class");
                    final IClass lvType = lv.type;
                    IClass.IField iField = ((IClass) icd).new IField() {
                        public Object  getConstantValue() { return null; }
                        public String  getName()          { return "val$" + identifier; }
                        public IClass  getType()          { return lvType; }
                        public boolean isStatic()         { return false; }
                        public int     getAccess()        { return IClass.PACKAGE; }
View Full Code Here

        }
        for (; i < j; ++i) {
            final String fieldName = "this$" + (path.size() - i - 2);
            final IClass inner = (IClass) path.get(i);
            final IClass outer = (IClass) path.get(i + 1);
            ((InnerClassDeclaration) inner).defineSyntheticField(inner.new IField() {
                public Object  getConstantValue() { return null; }
                public String  getName()          { return fieldName; }
                public IClass  getType()          { return outer; }
                public boolean isStatic()         { return false; }
                public int     getAccess()        { return IClass.PACKAGE; }
View Full Code Here

TOP

Related Classes of net.janino.IClass.IField

Copyright © 2018 www.massapicom. All rights reserved.
All source code are property of their respective owners. Java is a trademark of Sun Microsystems, Inc and owned by ORACLE Inc. Contact coftware#gmail.com.