Package ca.uhn.fhir.model.api.annotation

Examples of ca.uhn.fhir.model.api.annotation.ResourceDef


    }

    if (theReturnResourceType != null) {
      if (IResource.class.isAssignableFrom(theReturnResourceType)) {
        myResourceType = theReturnResourceType;
        ResourceDef resourceDefAnnotation = theReturnResourceType.getAnnotation(ResourceDef.class);
        if (resourceDefAnnotation == null) {
          throw new ConfigurationException(theReturnResourceType.getCanonicalName() + " has no @" + ResourceDef.class.getSimpleName() + " annotation");
        }
        myResourceName = resourceDefAnnotation.name();
      }
    }
  }
View Full Code Here


    BaseRuntimeElementDefinition<?> existingDef = myClassToElementDefinitions.get(theClass);
    if (existingDef != null) {
      return;
    }

    ResourceDef resourceDefinition = theClass.getAnnotation(ResourceDef.class);
    if (resourceDefinition != null) {
      if (!IResource.class.isAssignableFrom(theClass)) {
        throw new ConfigurationException("Resource type contains a @" + ResourceDef.class.getSimpleName() + " annotation but does not implement " + IResource.class.getCanonicalName() + ": " + theClass.getCanonicalName());
      }
      @SuppressWarnings("unchecked")
View Full Code Here

TOP

Related Classes of ca.uhn.fhir.model.api.annotation.ResourceDef

Copyright © 2018 www.massapicom. 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.