Examples of toObject()


Examples of anvil.core.Any.toObject()

    if (parameters.length<1) {
      throw parametersMissing(context, "remove");
    }
    Any index = parameters[0];
    if (index instanceof AnySynapse) {
      Synapse synapse = (Synapse)index.toObject();
      _dim.remove(synapse);
    } else {
      _dim.remove(index.toInt());
    }
    return this;
View Full Code Here

Examples of anvil.core.Any.toObject()

    if (parameters.length<2) {
      throw parametersMissing(context, "set");
    }
    Any value = parameters[1];
    if (value instanceof AnySynapse) {
      _dim.set(parameters[0].toInt(), (Synapse)value.toObject());
      return this;
    } else {
      throw context.BadParameter("Dimension may only contain anvil.brain.Synapse instances");
    }
  }
View Full Code Here

Examples of anvil.core.Any.toObject()

    }
    for(int i=0; i<n; i++) {
      Any p = parameters[i];
      try {
        if (p instanceof AnyTribe) {
          _tribe.attach((Tribe)p.toObject());
         
        } else if (p instanceof AnyCitizen) {
          _tribe.attach((Citizen)p.toObject());
         
        } else {
View Full Code Here

Examples of anvil.core.Any.toObject()

      try {
        if (p instanceof AnyTribe) {
          _tribe.attach((Tribe)p.toObject());
         
        } else if (p instanceof AnyCitizen) {
          _tribe.attach((Citizen)p.toObject());
         
        } else {
          throw context.BadParameter("Tribe or citizen expected");
        }
       
View Full Code Here

Examples of anvil.core.Any.toObject()

    }
    for(int i=0; i<n; i++) {
      Any p = parameters[i];
      try {
        if (p instanceof AnyTribe) {
          _tribe.detach((Tribe)p.toObject());
         
        } else if (p instanceof AnyCitizen) {
          _tribe.detach((Citizen)p.toObject());
         
        } else {
View Full Code Here

Examples of anvil.core.Any.toObject()

      try {
        if (p instanceof AnyTribe) {
          _tribe.detach((Tribe)p.toObject());
         
        } else if (p instanceof AnyCitizen) {
          _tribe.detach((Citizen)p.toObject());
         
        } else {
          throw context.BadParameter("Tribe or citizen expected");
        }
       
View Full Code Here

Examples of anvil.core.Any.toObject()

      Any value = values[i];
      if (value.isMap()) {
        AnyMap map = value.toMap();
        attrs.put(map.getLeft().toString(), map.getRight().toObject());
      } else if (value instanceof AnyAttribute) {
        attrs.put((Attribute)value.toObject());
      }
    }
    return new AnyAttributes(attrs);
  }
 
View Full Code Here

Examples of anvil.core.Any.toObject()

      throw parametersMissing(context, "setAttributes");
    }
    if (_result instanceof SearchResult) {
      Any param = parameters[0];
      if (!(param instanceof AnyAttributes)) {
        ((SearchResult)_result).setAttributes((Attributes)param.toObject());
      } else {
        throw context.BadParameter("Attributes expected");
      }
    }
    return this;
View Full Code Here

Examples of com.alibaba.citrus.util.internal.StaticFunctionDelegatorBuilder.toObject()

        for (Class<?> clazz : classes) {
            builder.addClass(clazz);
        }

        return builder.toObject();
    }

    /**
     * 取得包含所有utils的map
     *
 
View Full Code Here

Examples of com.asakusafw.testdriver.MockTextDefinition.toObject()

        DataModelSource result = retriever.createSource(definition, exporter, EMPTY);
        try {
            DataModelReflection ref;
            ref = result.next();
            assertThat(ref, is(not(nullValue())));
            assertThat(definition.toObject(ref), is(new Text("Hello, world!")));

            ref = result.next();
            assertThat(ref, is(not(nullValue())));
            assertThat(definition.toObject(ref), is(new Text("This is a test.")));
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.