Examples of CallParameters


Examples of org.jboss.errai.codegen.framework.CallParameters

    appendCallElement(new DeferredCallElement(new DeferredCallback() {
      @Override
      public void doDeferred(CallWriter writer, Context context, Statement statement) {
        writer.reset();
       
        CallParameters callParameters = (parameters != null) ?
            fromStatements(GenUtil.generateCallParameters(context, parameters)) : CallParameters.none();
        
         if (!type.isInterface() && type.getBestMatchingConstructor(callParameters.getParameterTypes()) == null)
           throw new UndefinedConstructorException(type, callParameters.getParameterTypes());

         StringBuilder buf = new StringBuilder();
         buf.append("new ").append(LoadClassReference.getClassReference(type, context, true));
         if (callParameters != null) {
           buf.append(callParameters.generate(Context.create(context)));
         }
         if (extendsBlock != null) {
           for (MetaField field : type.getDeclaredFields()) {
             context.addVariable(Variable.createClassMember(field.getName(), field.getType()));
           }
View Full Code Here

Examples of org.jboss.errai.codegen.framework.CallParameters

    this.staticMethod = staticMethod;
  }

  @Override
  public void handleCall(CallWriter writer, Context context, Statement statement) {
    CallParameters callParams = fromStatements(GenUtil.generateCallParameters(context, parameters));

    statement.generate(context);

    MetaClass[] parameterTypes = callParams.getParameterTypes();
    MetaMethod method = (staticMethod) ? statement.getType().getBestMatchingStaticMethod(methodName, parameterTypes)
            : statement.getType().getBestMatchingMethod(methodName, parameterTypes);
    if (method == null) {
      throw new UndefinedMethodException(statement.getType(), methodName, parameterTypes);
    }
View Full Code Here

Examples of org.jboss.errai.codegen.framework.CallParameters

  }

  @Override
  public void handleCall(CallWriter writer, Context context, Statement statement) {
    try {
      CallParameters callParams = fromStatements(GenUtil.generateCallParameters(context, parameters));

      statement.generate(context);

      MetaClass callType = statement.getType();

      MetaClass[] parameterTypes = callParams.getParameterTypes();
      final MetaMethod method = (staticMethod) ? callType.getBestMatchingStaticMethod(methodName, parameterTypes)
              : callType.getBestMatchingMethod(methodName, parameterTypes);

      if (method == null) {
        callType.getBestMatchingMethod(methodName, parameterTypes);
View Full Code Here

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

    appendCallElement(new DeferredCallElement(new DeferredCallback() {
      @Override
      public void doDeferred(CallWriter writer, Context context, Statement statement) {
        writer.reset();
       
        CallParameters callParameters = (parameters != null) ?
            fromStatements(GenUtil.generateCallParameters(context, parameters)) : CallParameters.none();
        
         if (!type.isInterface() && type.getBestMatchingConstructor(callParameters.getParameterTypes()) == null)
           throw new UndefinedConstructorException(type, callParameters.getParameterTypes());

         StringBuilder buf = new StringBuilder();
         buf.append("new ").append(LoadClassReference.getClassReference(type, context, true));
         if (callParameters != null) {
           buf.append(callParameters.generate(Context.create(context)));
         }
         if (extendsBlock != null) {
           for (MetaField field : type.getDeclaredFields()) {
             context.addVariable(Variable.createClassMember(field.getName(), field.getType()));
           }
View Full Code Here

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

    this.staticMethod = staticMethod;
  }

  @Override
  public void handleCall(CallWriter writer, Context context, Statement statement) {
    CallParameters callParams = fromStatements(GenUtil.generateCallParameters(context, parameters));

    statement.generate(context);

    MetaClass[] parameterTypes = callParams.getParameterTypes();
    MetaMethod method = (staticMethod) ? statement.getType().getBestMatchingStaticMethod(methodName, parameterTypes)
            : statement.getType().getBestMatchingMethod(methodName, parameterTypes);
    if (method == null) {
      throw new UndefinedMethodException(statement.getType(), methodName, parameterTypes);
    }
View Full Code Here

Examples of pt.webdetails.cpf.plugincall.base.CallParameters

  public static final String DATA_SOURCE_DEFINITION_METHOD_NAME = "listDataAccessTypes";

  public static String getCdfIncludes(String dashboard, String type, boolean debug, boolean absolute,
                                      String absRoot, String scheme) throws Exception {
    CallParameters params = new CallParameters();
    params.put("dashboardContent", dashboard);
    params.put("debug", debug);
    if (type != null) {
      params.put("dashboardType", type);
    }

    if (!StringUtils.isEmpty(absRoot)) {
      params.put("root", absRoot);
    }
    if (!StringUtils.isEmpty( scheme )) {
      params.put("scheme", scheme);
    }

    params.put( "absolute", absolute );

    //TODO: instantiate directly
    IPluginCall pluginCall = PluginEnvironment.env().getPluginCall( CorePlugin.CDF.getId(), "xcdf", "getHeaders" );
   
    return pluginCall.call( params.getParameters() );

  }
View Full Code Here

Examples of pt.webdetails.cpf.plugincall.base.CallParameters

  }

  public static String getDataSourceDefinitions(String plugin, String service, String method, boolean forceRefresh) throws Exception {
    IPluginCall pluginCall = PluginEnvironment.env().getPluginCall( plugin, null, method );
    CallParameters params = new CallParameters();
    params.put( "refreshCache", forceRefresh );
    return pluginCall.call( params.getParameters() );
  }
View Full Code Here

Examples of pt.webdetails.cpf.plugincall.base.CallParameters

    params.put( "refreshCache", forceRefresh );
    return pluginCall.call( params.getParameters() );
  }

  public static String getCdfContext(String dashboard, String action, String viewId) throws Exception {
    CallParameters params = new CallParameters();
    params.put("path", dashboard);
    params.put("action", action);
    params.put("viewId", viewId);

    IPluginCall pluginCall = PluginEnvironment.env().getPluginCall( CorePlugin.CDF.getId(), "xcdf", "getContext" );

    return pluginCall.call( params.getParameters() );

  }
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.