Package org.codehaus.janino.IClass

Examples of org.codehaus.janino.IClass.IField


            this.compileError("Could not load \"" + Java.join(typeName, ".") + "\"", ssid.getLocation());
            return;
        }

        // Static field?
        IField iField = iClass.getDeclaredIField(name);
        if (iField != null) {
            if (!iField.isStatic()) {
                this.compileError(
                    "Field \"" + name + "\" of \"" + Java.join(typeName, ".") + "\" must be static",
                    ssid.getLocation()
                );
            }
View Full Code Here


    /*package*/ IClass.IField[] getIFields(final Java.FieldDeclaration fd) {
        IClass.IField[] res = new IClass.IField[fd.variableDeclarators.length];
        for (int i = 0; i < res.length; ++i) {
            final Java.VariableDeclarator vd = fd.variableDeclarators[i];
            res[i] = this.resolve(fd.getDeclaringType()).new IField() {

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

            }
        }

        // JLS3 6.5.2.BL1.B1.B2.2 Static field imported through static-import-on-demand.
        {
            IField importedField = null;
            for (Iterator it = this.staticImportsOnDemand.iterator(); it.hasNext();) {
                IClass iClass = (IClass) it.next();
                IField f = iClass.getDeclaredIField(identifier);
                if (f != null) {
                        // JLS3 7.5.4 Static-Import-on-Demand Declaration
                        if (!UnitCompiler.this.isAccessible(f, enclosingBlockStatement)) continue;

                        if (importedField != null) {
                            UnitCompiler.this.compileError(
                                "Ambiguous static field import: \""
                                + importedField.toString()
                                + "\" vs. \""
                                + f.toString()
                                + "\""
                            );
                        }
                        importedField = f;
                    }
View Full Code Here

TOP

Related Classes of org.codehaus.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.