Examples of newInstance()


Examples of ca.uhn.fhir.context.RuntimeElemContainedResources.newInstance()

      case CONTAINED_RESOURCES: {
        RuntimeElemContainedResources targetElem = (RuntimeElemContainedResources) target;
        List<? extends IElement> values = child.getAccessor().getValues(myInstance);
        ContainedDt newDt;
        if (values == null || values.isEmpty() || values.get(0) == null) {
          newDt = targetElem.newInstance();
          child.getMutator().addValue(myInstance, newDt);
        } else {
          newDt = (ContainedDt) values.get(0);
        }
        ContainedResourcesState state = new ContainedResourcesState(getPreResourceState());
View Full Code Here

Examples of ca.uhn.fhir.context.RuntimePrimitiveDatatypeDefinition.newInstance()

        push(newState);
        return;
      }
      case PRIMITIVE_DATATYPE: {
        RuntimePrimitiveDatatypeDefinition primitiveTarget = (RuntimePrimitiveDatatypeDefinition) target;
        IPrimitiveDatatype<?> newChildInstance = primitiveTarget.newInstance();
        myDefinition.getMutator().addValue(myParentInstance, newChildInstance);
        PrimitiveState newState = new PrimitiveState(getPreResourceState(), newChildInstance);
        push(newState);
        return;
      }
View Full Code Here

Examples of ca.uhn.fhir.context.RuntimePrimitiveDatatypeNarrativeDefinition.newInstance()

        push(newState);
        return;
      }
      case PRIMITIVE_XHTML: {
        RuntimePrimitiveDatatypeNarrativeDefinition xhtmlTarget = (RuntimePrimitiveDatatypeNarrativeDefinition) target;
        XhtmlDt newDt = xhtmlTarget.newInstance();
        child.getMutator().addValue(myInstance, newDt);
        XhtmlState state = new XhtmlState(getPreResourceState(), newDt, true);
        push(state);
        return;
      }
View Full Code Here

Examples of ca.uhn.fhir.context.RuntimeResourceBlockDefinition.newInstance()

        push(newState);
        return;
      }
      case RESOURCE_BLOCK: {
        RuntimeResourceBlockDefinition blockTarget = (RuntimeResourceBlockDefinition) target;
        IResourceBlock newBlockInstance = blockTarget.newInstance();
        child.getMutator().addValue(myInstance, newBlockInstance);
        ElementCompositeState newState = new ElementCompositeState(getPreResourceState(), blockTarget, newBlockInstance);
        push(newState);
        return;
      }
View Full Code Here

Examples of ca.uhn.fhir.context.RuntimeResourceDefinition.newInstance()

      String resourceType = id.getResourceType();
      RuntimeResourceDefinition def = myContext.getResourceDefinition(resourceType);
      if (def == null) {
        throw new DataFormatException("Entry references unknown resource type: " + resourceType);
      }
      resource = def.newInstance();
      resource.setId(id);
      entry.setResource(resource);
    }

    if (resource != null) {
View Full Code Here

Examples of ch.marcsladek.jrtnp.clientManager.ClientManagerFactory.newInstance()

  private ClientManager getClientManager(Class<? extends ConnectionFactory> connectionFactoryClass,
      Class<? extends ClientManagerFactory> clientManagerFactoryClass)
      throws ReflectiveOperationException {
    if (clientManagerFactoryClass != null) {
      ClientManagerFactory factory = clientManagerFactoryClass.getConstructor().newInstance();
      return factory.newInstance(connectionFactoryClass);
    } else {
      return new DefaultClientManager(connectionFactoryClass);
    }
  }
View Full Code Here

Examples of ch.marcsladek.jrtnp.connection.ConnectionFactory.newInstance()

   */
  public Client(String host, int port,
      Class<? extends ConnectionFactory> connectionFactoryClass)
      throws ReflectiveOperationException, IOException {
    ConnectionFactory factory = connectionFactoryClass.getConstructor().newInstance();
    server = factory.newInstance(new Socket(host, port));
  }

  /**
   * Starts the listener for the server
   */
 
View Full Code Here

Examples of clojure.asm.commons.GeneratorAdapter.newInstance()

                        meth,
                        null,
                        null,
                        cv);
      gen.visitCode();
      gen.newInstance(objtype);
      gen.dup();
      gen.loadArg(0);

      for(ISeq s = RT.keys(closes); s != null; s = s.next(), ++a)
        {
View Full Code Here

Examples of com.adobe.epubcheck.opf.DocumentValidatorFactory.newInstance()

          Messages.get("mode_version_not_supported"), mode, version));

      throw new RuntimeException(String.format(Messages.get("mode_version_not_supported"), mode, version));
    }

    DocumentValidator check = factory.newInstance(report, path,
        resourceProvider, modeMimeTypeMap.get(opsType),
        version);
    if (check.getClass() == EpubCheck.class)
    {
      int validationResult = ((EpubCheck)check).doValidate();
View Full Code Here

Examples of com.alibaba.dubbo.common.bytecode.Mixin.newInstance()

public class MixinTest extends TestCase
{
  public void testMain() throws Exception
  {
    Mixin mixin = Mixin.mixin(new Class[]{ I1.class, I2.class, I3.class }, new Class[]{ C1.class, C2.class });
    Object o = mixin.newInstance(new Object[]{ new C1(), new C2() });
    assertEquals(o instanceof I1, true);
    assertEquals(o instanceof I2, true);
    assertEquals(o instanceof I3, true);
    ((I1)o).m1();
    ((I2)o).m2();
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.