Examples of VariableReference


Examples of org.jboss.errai.ioc.rebind.ioc.codegen.VariableReference

/**
* @author Mike Brock <cbrock@redhat.com>
*/
public abstract class Refs {
  public static VariableReference get(final String name) {
    return new VariableReference() {
      private MetaClass type;

      @Override
      public String getName() {
        return name;
      }

      @Override
      public Statement getValue() {
        return new Statement() {

          @Override
          public String generate(Context context) {
            VariableReference var = context.getVariable(name);

            if (var == null) {
              throw new OutOfScopeException("could not access variable: " + name);
            }

            type = var.getType();

            return name;
          }

          @Override
View Full Code Here

Examples of org.pdf4j.saxon.expr.VariableReference

    public final VariableReference bindVariable(StructuredQName qName) throws XPathException {
        // bindVariable is called at compile time, but the JAXP variable resolver
        // is designed to be called at run time. So we need to create a variable now,
        // which will call the variableResolver when called upon to return the run-time value
        if (variableResolver != null) {
            return new VariableReference(new JAXPVariable(qName, variableResolver));
        } else {
            throw new XPathException(
                    "Variable is used in XPath expression, but no JAXP VariableResolver is available");
        }
    }
View Full Code Here

Examples of org.pdf4j.saxon.expr.VariableReference

    public VariableReference bindVariable(StructuredQName qName) throws XPathException {
        XPathVariable var = (XPathVariable)variables.get(qName);
        if (var==null) {
            throw new XPathException("Undeclared variable in XPath expression: $" + qName.getClarkName());
        } else {
            return new VariableReference(var);
        }
    }
View Full Code Here

Examples of org.pdf4j.saxon.expr.VariableReference

     * @throws XPathException if the variable has not been declared
    */

    public VariableReference bindVariable(StructuredQName qName) throws XPathException {
        XSLVariableDeclaration xslVariableDeclaration = element.bindVariable(qName);
        VariableReference var = (xslVariableDeclaration.isGlobal()
                                    ? new VariableReference()
                                    : new LocalVariableReference());
        xslVariableDeclaration.registerReference(var);
        return var;
    }
View Full Code Here

Examples of org.springframework.expression.spel.ast.VariableReference

    }
    Token t = nextToken();
    Token functionOrVariableName = eatToken(TokenKind.IDENTIFIER);
    SpelNodeImpl[] args = maybeEatMethodArgs();
    if (args==null) {
      push(new VariableReference(functionOrVariableName.data,toPos(t.startpos,functionOrVariableName.endpos)));
      return true;
    } else {
      push(new FunctionReference(functionOrVariableName.data,toPos(t.startpos,functionOrVariableName.endpos),args));
      return true;
    }
View Full Code Here

Examples of org.springframework.expression.spel.ast.VariableReference

    }
    Token t = nextToken();
    Token functionOrVariableName = eatToken(TokenKind.IDENTIFIER);
    SpelNodeImpl[] args = maybeEatMethodArgs();
    if (args==null) {
      push(new VariableReference(functionOrVariableName.data,toPos(t.startpos,functionOrVariableName.endpos)));
      return true;
    } else {
      push(new FunctionReference(functionOrVariableName.data,toPos(t.startpos,functionOrVariableName.endpos),args));
      return true;
    }
View Full Code Here

Examples of org.springframework.expression.spel.ast.VariableReference

    }
    Token t = nextToken();
    Token functionOrVariableName = eatToken(TokenKind.IDENTIFIER);
    SpelNodeImpl[] args = maybeEatMethodArgs();
    if (args==null) {
      push(new VariableReference(functionOrVariableName.data,toPos(t.startpos,functionOrVariableName.endpos)));
      return true;
    } else {
      push(new FunctionReference(functionOrVariableName.data,toPos(t.startpos,functionOrVariableName.endpos),args));
      return true;
    }
View Full Code Here

Examples of org.springframework.expression.spel.ast.VariableReference

    }
    Token t = nextToken();
    Token functionOrVariableName = eatToken(TokenKind.IDENTIFIER);
    SpelNodeImpl[] args = maybeEatMethodArgs();
    if (args == null) {
      push(new VariableReference(functionOrVariableName.data, toPos(t.startPos,
          functionOrVariableName.endPos)));
      return true;
    }

    push(new FunctionReference(functionOrVariableName.data, toPos(t.startPos,
View Full Code Here

Examples of railo.runtime.type.ref.VariableReference

  }
 
  protected static QueryColumn toColumn(PageContext pc,String strQueryColumn) throws PageException {
      //if(strQueryColumn.indexOf('.')<1)
      //    throw new ExpressionException("invalid query column definition ["+strQueryColumn+"]");
    VariableReference ref = ((PageContextImpl)pc).getVariableReference(strQueryColumn);
    if(ref.getParent() instanceof Scope)
        throw new ExpressionException("invalid query column definition ["+strQueryColumn+"]");
   
   
    Query query=Caster.toQuery(ref.getParent());
    return query.getColumn(ref.getKey());
  }
View Full Code Here

Examples of railo.runtime.type.ref.VariableReference

    return variableUtil.get(this,coll,key);
  }
 
    @Override
    public Reference getReference(Object coll, String key) throws PageException {
    return new VariableReference(coll,key);
  }
View Full Code Here
TOP
Copyright © 2018 www.massapi.com. 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.