Examples of Closure


Examples of org.apache.commons.collections.Closure

        final Collection allRoles = new LinkedHashSet(roles);

        // add all roles which are generalizations of this one
        CollectionUtils.forAllDo(
            roles,
            new Closure()
            {
                public void execute(final Object object)
                {
                    allRoles.addAll(((Role)object).getAllSpecializations());
                }
View Full Code Here

Examples of org.apache.commons.collections.Closure

    protected Collection handleGetAllRoles()
    {
        final Collection roles = new LinkedHashSet(this.getRoles());
        CollectionUtils.forAllDo(
            this.getOperations(),
            new Closure()
            {
                public void execute(final Object object)
                {
                    if (object instanceof ServiceOperation)
                    {
View Full Code Here

Examples of org.apache.commons.collections.Closure

     * @see org.andromda.metafacades.uml.Service#getMessagingDestinations()
     */
    protected Collection handleGetMessagingDestinations()
    {
        final Set destinations = new LinkedHashSet();
        CollectionUtils.forAllDo(this.getOperations(), new Closure()
        {
            public void execute(Object object)
            {
                if (object instanceof ServiceOperation)
                {
View Full Code Here

Examples of org.apache.commons.collections.Closure

        // get references of the service itself
        result.addAll(this.getEntityReferences());

        // get references of all super classes
        CollectionUtils.forAllDo(this.getAllGeneralizations(), new Closure()
        {
            public void execute(Object object)
            {
                if (object instanceof Service)
                {
View Full Code Here

Examples of org.apache.commons.collections.Closure

        // get references of the service itself
        result.addAll(this.getMessagingDestinations());

        // get references of all super classes
        CollectionUtils.forAllDo(this.getAllGeneralizations(), new Closure()
        {
            public void execute(Object object)
            {
                if (object instanceof Service)
                {
View Full Code Here

Examples of org.apache.commons.collections15.Closure

        }
        if (predicatesAndClosures.size() == 0) {
            return NOPClosure.INSTANCE;
        }
        // convert to array like this to guarantee iterator() ordering
        Closure defaultClosure = (Closure) predicatesAndClosures.remove(null);
        int size = predicatesAndClosures.size();
        if (size == 0) {
            return (defaultClosure == null ? NOPClosure.INSTANCE : defaultClosure);
        }
        closures = new Closure[size];
View Full Code Here

Examples of org.apache.felix.gogo.runtime.Closure

        Session session = (Session) commandSession.get(".session");
        // When need to translate closures to a compatible type for the command
        for (int i = 0; i < arguments.size(); i++) {
            Object v = arguments.get(i);
            if (v instanceof Closure) {
                final Closure closure = (Closure) v;
                arguments.set(i, new org.apache.karaf.shell.api.console.Function() {
                    @Override
                    public Object execute(Session session, List<Object> arguments) throws Exception {
                        return closure.execute(commandSession, arguments);
                    }
                });
            }
        }
        return execute(session, arguments);
View Full Code Here

Examples of org.gstreamer.Closure

                                + " pad=" + pad.getNativeAddress());
                        Arrays.fill(data, color++);
                        buffer.getByteBuffer().put(data, 0, data.length);
                    }
                });
                fakesrc.connect("handoff", new Closure() {
                    @SuppressWarnings("unused")
                    public void invoke(Element element, Buffer buffer, Pad pad) {
                        System.out.println("Closure: Element=" + element.getNativeAddress()
                                + " buffer=" + buffer.getNativeAddress()
                                + " pad=" + pad.getNativeAddress());
View Full Code Here

Examples of org.pdf4j.saxon.value.Closure

     * @return the constructed Closure
     */

    public Value makeClosure(Expression expression, int ref, XPathContext context) throws XPathException {
        if (ref == 1) {
            return new Closure();
        } else {
            return new MemoClosure();
        }
    }
View Full Code Here

Examples of org.renjin.sexp.Closure

  public void closureBody() throws IOException {
    assumingBasePackagesLoad();
    topLevelContext.evaluate(
    RParser.parseSource(new InputStreamReader(getClass().getResourceAsStream("/meanOnline.R"))));
   
    Closure closure = (Closure) topLevelContext.getGlobalEnvironment().getVariable("mean.online");
    IRBodyBuilder factory = new IRBodyBuilder(functionTable);
    factory.dump(closure.getBody());
  }
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.