Package jetbrick.template.parser.support

Examples of jetbrick.template.parser.support.TypedKlass


        this.resolver = resolver;
        consume(true);
    }

    protected TypedKlass asTypedKlass() {
        TypedKlass type = type();
        match(EOF);
        return type;
    }
View Full Code Here


            throw ExceptionUtils.uncheck(e);
        }
    }

    public void addGlobalVariable(String klassName, String name) {
        TypedKlass klass = resolveTypedKlass(klassName);
        if (klass == null || klass == TypedKlass.NULL) {
            throw new RuntimeException("ClassNotFoundException: " + klassName);
        }
        if (variableMap.put(name, klass) == null) {
            log.info("add variable: {} {}", klass.getSource(), name);
        }
    }
View Full Code Here

        }
        return null;
    }

    public TypedKlass resolveVariable(String identifier) {
        TypedKlass klass = variableMap.get(identifier);
        if (klass == null) {
            klass = TypedKlass.Object;
        }
        return klass;
    }
View Full Code Here

        this.symbols = new HashMap<String, TypedKlass>();
    }

    // 查找已经定义的变量类型
    public TypedKlass resolve(String name, boolean deep) {
        TypedKlass klass = symbols.get(name);
        if (klass != null) {
            return klass;
        }
        if (!deep && this instanceof MethodCode) return null;
View Full Code Here

TOP

Related Classes of jetbrick.template.parser.support.TypedKlass

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.