Examples of ClassExpression


Examples of org.codehaus.groovy.ast.expr.ClassExpression

        final Collection<Expression> values = annotation.getMembers().values();
        final Expression value = values.isEmpty() ? null : values.iterator().next();
        if (value != null && value instanceof ClassExpression) {
            classExpression = value;
        } else {
            classExpression = new ClassExpression(ClassHelper.make(GParsPoolUtil.class));
        }

        validatePoolClass(classExpression, fieldNode, source);
        final Expression initExpression = ((FieldNode) fieldNode).getInitialValueExpression();
        final ConstantExpression blocking = new ConstantExpression(memberHasValue(annotation, "blocking", true));
View Full Code Here

Examples of org.codehaus.groovy.ast.expr.ClassExpression

            return classNode.addField(logFieldName,
                    Modifier.FINAL | Modifier.TRANSIENT | Modifier.PROTECTED,
                    new ClassNode(InternalActor.class),
                    new MethodCallExpression(
                            new ClassExpression(new ClassNode(InternalActor.class)),
                            "create",
                            args));
        }
View Full Code Here

Examples of org.datanucleus.query.expression.ClassExpression

            // Process all ClassExpression(s) in the FROM, adding joins to the statement as required
            compileComponent = CompilationComponent.FROM;
            Expression[] fromExprs = compilation.getExprFrom();
            for (int i=0;i<fromExprs.length;i++)
            {
                ClassExpression clsExpr = (ClassExpression)fromExprs[i];
                compileFromClassExpression(clsExpr);
            }
            compileComponent = null;
        }
    }
View Full Code Here

Examples of org.datanucleus.query.expression.ClassExpression

                            symtbl.addSymbol(new PropertySymbol(frmJoin.getAlias(), frmJoinCls));
                        }
                    }
                }

                ClassExpression clsExpr = (ClassExpression)frm.getQueryExpression(true);
                clsExpr.bind(symtbl);
                fromExprs[i++] = clsExpr;
            }

            org.datanucleus.query.expression.Expression filterExpr = null;
            if (filter != null)
View Full Code Here

Examples of org.datanucleus.query.expression.ClassExpression

     */
    public org.datanucleus.query.expression.Expression getQueryExpression(boolean from)
    {
        if (from)
        {
            ClassExpression expr = new ClassExpression(getAlias());
            if (joins != null && !joins.isEmpty())
            {
                List tuples = new ArrayList();
                tuples.add(getAlias());

View Full Code Here

Examples of org.jboss.aop.pointcut.ast.ClassExpression

      this.ignore.addAll(ignore);
      ignoreExpressions = new ClassExpression[ignore.size()];
      for (int i = 0 ; i < ignore.size() ; i++)
      {
        String ex = ignore.get(i);
        ignoreExpressions[i] = new ClassExpression(ex);
      }
   }
View Full Code Here

Examples of org.jboss.aop.pointcut.ast.ClassExpression

      this.ignore.addAll(ignore);
      ignoreExpressions = new ClassExpression[ignore.size()];
      for (int i = 0 ; i < ignore.size() ; i++)
      {
        String ex = ignore.get(i);
        ignoreExpressions[i] = new ClassExpression(ex);
      }
   }
View Full Code Here

Examples of org.jboss.aop.pointcut.ast.ClassExpression

      this.ignore.addAll(ignore);
      ignoreExpressions = new ClassExpression[ignore.size()];
      for (int i = 0 ; i < ignore.size() ; i++)
      {
        String ex = ignore.get(i);
        ignoreExpressions[i] = new ClassExpression(ex);
      }
   }
View Full Code Here

Examples of org.jpox.store.mapped.expression.ClassExpression

            candidateAlias = exprs[0].getAlias().toUpperCase(); // Identifiers are case insensitive

            candidateExpressions = new ClassExpression[exprs.length];
            for (int i=0; i<candidateExpressions.length; i++)
            {
                ClassExpression classExpr = (ClassExpression)exprs[i];
                if (classExpr.getCls() == null)
                {
                    // Candidate expression is for the candidate but candidate wasnt known at the time of compilation
                    candidateExpressions[i] = new ClassExpression(qs, candidateClass);
                    candidateExpressions[i].as(candidateAlias);
                    JoinExpression[] joins = classExpr.getJoins();
                    if (joins != null)
                    {
                        for (int j=0;j<joins.length;j++)
                        {
                            candidateExpressions[i].join(joins[j]);
View Full Code Here

Examples of org.jpox.store.mapped.expression.ClassExpression

     * @param fromStr The from expression string
     * @return Class Expression for this part of the FROM
     */
    protected ClassExpression compileFromExpression(String fromStr)
    {
        ClassExpression expr = null;

        p = new JPQLParser(fromStr, imports);
        if (p.parseStringIgnoreCase("IN"))
        {
            // "IN(...) [AS] alias"
            if (!p.parseChar('('))
            {
                throw new QueryCompilerSyntaxException("Expected: '(' but got " + p.remaining(),
                    p.getIndex(), p.getInput());
            }

            // Find what we are joining to
            String name = p.parseIdentifier();
            if (p.nextIsDot())
            {
                p.parseChar('.');
                name += ".";
                name += p.parseName();
            }

            if (!p.parseChar(')'))
            {
                throw new QueryCompilerSyntaxException("Expected: ')' but got " + p.remaining(),
                    p.getIndex(), p.getInput());
            }

            p.parseStringIgnoreCase("AS"); // Optional
            String alias = p.parseName();

            // Return as part of ClassExpression joining candidate class to this collection field
            expr = new ClassExpression(qs, candidateClass);
            expr.as(candidateAlias);
            JoinExpression joinExpr = new JoinExpression(qs, name, false, false);
            joinExpr.as(alias);
            expr.join(joinExpr);

            // Update with any subsequent JOIN expressions
            compileFromJoinExpressions(expr);
        }
        else
        {
            // "<candidate_expression> [AS] alias"
            String id = p.parseIdentifier();

            String name = id;
            if (p.nextIsDot())
            {
                p.parseChar('.');
                name += ".";
                name += p.parseName();
            }

            if (parentExpr != null)
            {
                // Subquery, so calculate any candidate expression
                Class cls = null;
                cls = getClassForSubqueryCandidateExpression(name);
                expr = new ClassExpression(qs, cls);
                id = p.parseIdentifier();
                if (id != null)
                {
                    // Add alias to class/class.field
                    if (id.equalsIgnoreCase("AS"))
                    {
                        id = p.parseIdentifier();
                    }
                    if (id != null)
                    {
                        expr.as(id);
                    }
                }
            }
            else
            {
                Class cls = query.resolveClassDeclaration(name);
                expr = new ClassExpression(qs, cls);
                id = p.parseIdentifier();
                if (id != null)
                {
                    // Add alias to class/class.field
                    if (id.equalsIgnoreCase("AS"))
                    {
                        id = p.parseIdentifier();
                    }
                    if (id != null)
                    {
                        expr.as(id);
                    }
                }
            }

            // Update with any subsequent JOIN expressions
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.