Package org.codehaus.groovy.ast

Examples of org.codehaus.groovy.ast.Variable


    }

    public void visitFieldExpression(FieldExpression expression) {
        String name = expression.getFieldName();
        //TODO: change that to get the correct scope
        Variable v = checkVariableNameForDeclaration(name, expression);
        checkVariableContextAccess(v, expression);
    }
View Full Code Here


            if (!(value instanceof String)) {
                throw new GroovyBugError("tried to make a method call with a non-String constant method name.");
            }

            String methodName = (String) value;
            Variable v = checkVariableNameForDeclaration(methodName, call);
            if (v != null && !(v instanceof DynamicVariable)) {
                checkVariableContextAccess(v, call);
            }

            if (v instanceof VariableExpression || v instanceof Parameter) {
View Full Code Here

  @Override
  public void visitVariableExpression(VariableExpression expr) {
    super.visitVariableExpression(expr);

    Variable var = expr.getAccessedVariable();
    if (!(var instanceof FieldNode)) return;

    checkFieldAccess(expr, (FieldNode) var);
  }
View Full Code Here

TOP

Related Classes of org.codehaus.groovy.ast.Variable

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.