Examples of MethodExpression


Examples of org.apache.commons.betwixt.expression.MethodExpression

                if (log.isTraceEnabled()) {
                    log.trace( "Adding property as element: " + name );
                }
                nodeDescriptor = new ElementDescriptor(true);
            }
            nodeDescriptor.setTextExpression( new MethodExpression( readMethod ) );
           
            if ( writeMethod != null ) {
                nodeDescriptor.setUpdater( new MethodUpdater( writeMethod ) );
            }
        } else if ( isLoopType( type ) ) {
            if (log.isTraceEnabled()) {
                log.trace("Loop type: " + name);
                log.trace("Wrap in collections? " + introspector.isWrapCollectionsInElement());
            }
            ElementDescriptor loopDescriptor = new ElementDescriptor();
            loopDescriptor.setContextExpression(
                new IteratorExpression( new MethodExpression( readMethod ) )
            );
            loopDescriptor.setWrapCollectionsInElement(
                        introspector.isWrapCollectionsInElement());
            // XXX: need to support some kind of 'add' or handle arrays, Lists or indexed properties
            //loopDescriptor.setUpdater( new MethodUpdater( writeMethod ) );
            if ( Map.class.isAssignableFrom( type ) ) {
                loopDescriptor.setQualifiedName( "entry" );
                // add elements for reading
                loopDescriptor.addElementDescriptor( new ElementDescriptor( "key" ) );
                loopDescriptor.addElementDescriptor( new ElementDescriptor( "value" ) );
            }

            ElementDescriptor elementDescriptor = new ElementDescriptor();
            elementDescriptor.setWrapCollectionsInElement(
                        introspector.isWrapCollectionsInElement());
            elementDescriptor.setElementDescriptors( new ElementDescriptor[] { loopDescriptor } );
           
            nodeDescriptor = elementDescriptor;           
        } else {
            if (log.isTraceEnabled()) {
                log.trace( "Standard property: " + name);
            }
            ElementDescriptor elementDescriptor = new ElementDescriptor();
            elementDescriptor.setContextExpression( new MethodExpression( readMethod ) );
            if ( writeMethod != null ) {
                elementDescriptor.setUpdater( new MethodUpdater( writeMethod ) );
            }
           
            nodeDescriptor = elementDescriptor;         
View Full Code Here

Examples of org.apache.olingo.odata2.api.uri.expression.MethodExpression

      appendExpression(((BinaryExpression) expression).getLeftOperand(), writer);
      writer.append("</li><li>");
      appendExpression(((BinaryExpression) expression).getRightOperand(), writer);
      writer.append("</li></ol>");
    } else if (kind == ExpressionKind.METHOD) {
      final MethodExpression methodExpression = (MethodExpression) expression;
      if (methodExpression.getParameterCount() > 0) {
        writer.append("<ol class=\"expr\">");
        for (final CommonExpression parameter : methodExpression.getParameters()) {
          writer.append("<li>");
          appendExpression(parameter, writer);
          writer.append("</li>");
        }
        writer.append("</ol>");
View Full Code Here

Examples of org.jboss.aop.expressions.MethodExpression

      public String attr;
      public Object value;

      public QueuedMethodMetaData(String expr, String tag, String attr, Object value)
      {
         this.expr = new MethodExpression(expr);
         this.tag = tag;
         this.attr = attr;
         this.value = value;
      }
View Full Code Here

Examples of org.jboss.seam.core.Expressions.MethodExpression

         if (actionId!=null)
         {
            if ( !SafeActions.instance().isActionSafe(actionId) ) return result;
            String expression = SafeActions.toAction(actionId);
            result = true;
            MethodExpression actionExpression = Expressions.instance().createMethodExpression(expression);
            outcome = toString( actionExpression.invoke() );
            fromAction = expression;
            handleOutcome(facesContext, outcome, fromAction);
         }
      }
      else
View Full Code Here

Examples of org.jboss.seam.core.Expressions.MethodExpression

         le.initCause(ex);
         throw le;
      }
     
      // If an authentication method has been specified, use that to authenticate
      MethodExpression mb = Identity.instance().getAuthenticateMethod();
      if (mb != null)
      {
         try
         {
           return (Boolean) mb.invoke();     
         }
         catch (Exception ex)
         {
            log.error("Error invoking login method", ex);
            throw new LoginException(ex.getMessage());
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.