Examples of Closure


Examples of com.caucho.quercus.env.Closure

   *
   * @return the expression value.
   */
  private Value evalImpl(Env env)
  {
    return new Closure(env, _fun);
  }
View Full Code Here

Examples of com.codereligion.hammock.compiler.model.Closure

            parameterType = new Name(firstParameter.asType().toString());
        } else {
            parameterType = new Name(typeElement.getQualifiedName().toString());
        }

        final Closure closure;

        if (method.getReturnType().getKind() == TypeKind.BOOLEAN) {
            closure = new Closure(name, delegate, parameterType, isStatic, annotation.nullsafe());
        } else {
            final Name returnType = new Name(method.getReturnType().toString());
            closure = new Closure(name, delegate, parameterType, returnType, isStatic, annotation.nullsafe());
        }

        final Type type = storage.apply(typeElement);
        Preconditions.checkNotNull(type, "No type found for %s", typeElement);
        type.getClosures().add(closure);
View Full Code Here

Examples of com.codereligion.hammock.compiler.model.api.Closure

        final Functional functional = method.getAnnotation(Functional.class);
        final ClosureName name = new StringClosureName(method.getSimpleName().toString());
        final Name parameterType = new StringName(typeElement.getQualifiedName().toString());

        final Closure closure;
        if (method.getReturnType().getKind() == TypeKind.BOOLEAN) {
            closure = new BaseClosure(name, parameterType, functional.nullsafe());
        } else {
            final Name returnType = new StringName(method.getReturnType().toString());
            closure = new BaseClosure(name, parameterType, returnType, functional.nullsafe());
View Full Code Here

Examples of com.dotcms.repackage.groovy.lang.Closure

      public Object apply(String source, int lineNo, int columnNo, Object funcBody, Vector paramNames,
                          Vector arguments) throws BSFException {
          Object object = eval(source, lineNo, columnNo, funcBody);
          if (object instanceof Closure) {
              // lets call the function
              Closure closure = (Closure) object;
              return closure.call(arguments.toArray());
          }
          return object;
      }
View Full Code Here

Examples of com.microworkflow.execution.Closure

  }
  protected void tearDown() throws Exception {
    scheduler.shutdown();
  }
  protected Closure makeCommandWith(final int id) {
    return new Closure() {
      public Object evaluate() {
        if ((id % 5) == 0) {
          synchronized(this) {
            try {
              wait(200);
View Full Code Here

Examples of com.netflix.hystrix.contrib.javanica.command.closure.Closure

    @Override
    public Object executeWithArgs(ExecutionType executionType, Object[] args) throws CommandActionExecutionException {
        if (ExecutionType.SYNCHRONOUS.equals(executionType)) {
            return execute(object, method, args);
        } else {
            Closure closure = ClosureFactoryRegistry.getFactory(executionType).createClosure(method, object, args);
            return execute(closure.getClosureObj(), closure.getClosureMethod());
        }
    }
View Full Code Here

Examples of com.oracle.truffle.r.runtime.data.RPromise.Closure

                    // If neither supplied nor default argument
                    evaledArgs[i] = RMissing.instance;
                } else {
                    // <null> for environment leads to it being fitted with the REnvironment on the
                    // callee side
                    Closure defaultClosure = formals.getOrCreateClosure(defaultArg);
                    evaledArgs[i] = RPromise.create(EvalPolicy.INLINED, PromiseType.ARG_DEFAULT, null, defaultClosure);
                }
            } else if (function.isBuiltin() && evaledArg instanceof RPromise) {
                RPromise promise = (RPromise) evaledArg;
                evaledArgs[i] = promise.evaluate(frame, promiseProfile);
View Full Code Here

Examples of com.strobel.compilerservices.Closure

        try {
            final T instance;

            if (_hasClosureArgument) {
                final Constructor<?> constructor = generatedClass.getConstructor(Closure.class);
                final Closure closure = new Closure(_boundConstants.toArray(), null);
                instance = (T) constructor.newInstance(closure);
            }
            else {
                instance = generatedClass.newInstance();
            }
View Full Code Here

Examples of com.sun.corba.se.spi.orbutil.closure.Closure

    }

    private void registerInitialReferences( final ORB orb )
    {
        // Register the Dynamic Any factory
        Closure closure = new Closure() {
            public java.lang.Object evaluate() {
                return new DynAnyFactoryImpl( orb ) ;
            }
        } ;

        Closure future = ClosureFactory.makeFuture( closure ) ;
        orb.getLocalResolver().register( ORBConstants.DYN_ANY_FACTORY_NAME,
            future ) ;
    }
View Full Code Here

Examples of dynaop.util.Closure

  public void testAnnotateWithMixin() {
    Aspects aspects = new Aspects();
    aspects.interceptor(Pointcuts.instancesOf(SecureObject.class),
        Pointcuts.ALL_METHODS, new AccessInterceptor((MethodAccessManager) callAccessManager.proxy()));
    aspects.mixin(Pointcuts.instancesOf(SecureObject.class),
        OwnableMixin.class, new Closure() {
          public void execute(Object o) {
          }
        });

    callAccessManager.expects(atLeastOnce()).method("checkPermission").will(returnValue(false));
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.