public PatchMethodBinding(Method theMethod, FhirContext theContext, Object theProvider) { super(theMethod, theContext, theProvider, Patch.class, theMethod.getAnnotation(Patch.class).type()); for (ListIterator<Class<?>> iter = Arrays.asList(theMethod.getParameterTypes()).listIterator(); iter.hasNext();) { int nextIndex = iter.nextIndex(); Class<?> next = iter.next(); if (next.equals(PatchTypeEnum.class)) { myPatchTypeParameterIndex = nextIndex; } for (Annotation nextAnnotation : theMethod.getParameterAnnotations()[nextIndex]) { if (nextAnnotation instanceof ResourceParam) { myResourceParamIndex = nextIndex; } } } if (myPatchTypeParameterIndex == -1) { throw new ConfigurationException("Method has no parameter of type " + PatchTypeEnum.class.getName() + " - " + theMethod.toString()); } if (myResourceParamIndex == -1) { throw new ConfigurationException("Method has no parameter with @" + ResourceParam.class.getSimpleName() + " annotation - " + theMethod.toString()); } }
public PatchMethodBinding(Method theMethod, FhirContext theContext, Object theProvider) { super(theMethod, theContext, theProvider, Patch.class, theMethod.getAnnotation(Patch.class).type()); for (ListIterator<Class<?>> iter = Arrays.asList(theMethod.getParameterTypes()).listIterator(); iter.hasNext();) { int nextIndex = iter.nextIndex(); Class<?> next = iter.next(); if (next.equals(PatchTypeEnum.class)) { myPatchTypeParameterIndex = nextIndex; } for (Annotation nextAnnotation : theMethod.getParameterAnnotations()[nextIndex]) { if (nextAnnotation instanceof ResourceParam) { myResourceParamIndex = nextIndex; } } } if (myPatchTypeParameterIndex == -1) { throw new ConfigurationException("Method has no parameter of type " + PatchTypeEnum.class.getName() + " - " + theMethod.toString()); } if (myResourceParamIndex == -1) { throw new ConfigurationException("Method has no parameter with @" + ResourceParam.class.getSimpleName() + " annotation - " + theMethod.toString()); } }
returnTypeFromAnnotation = delete.type(); } else if (patch != null) { returnTypeFromAnnotation = patch.type(); } else if (create != null) { returnTypeFromAnnotation = create.type();
returnTypeFromAnnotation = delete.type(); } else if (patch != null) { returnTypeFromAnnotation = patch.type(); } else if (create != null) { returnTypeFromAnnotation = create.type();
public PatchMethodBinding(Method theMethod, FhirContext theContext, Object theProvider) { super(theMethod, theContext, theProvider, Patch.class, theMethod.getAnnotation(Patch.class).type()); for (ListIterator<Class<?>> iter = Arrays.asList(theMethod.getParameterTypes()).listIterator(); iter.hasNext();) { int nextIndex = iter.nextIndex(); Class<?> next = iter.next(); if (next.equals(PatchTypeEnum.class)) { myPatchTypeParameterIndex = nextIndex; } for (Annotation nextAnnotation : theMethod.getParameterAnnotations()[nextIndex]) { if (nextAnnotation instanceof ResourceParam) { myResourceParamIndex = nextIndex; } } } if (myPatchTypeParameterIndex == -1) { throw new ConfigurationException("Method has no parameter of type " + PatchTypeEnum.class.getName() + " - " + theMethod.toString()); } if (myResourceParamIndex == -1) { throw new ConfigurationException("Method has no parameter with @" + ResourceParam.class.getSimpleName() + " annotation - " + theMethod.toString()); } }
public PatchMethodBinding(Method theMethod, FhirContext theContext, Object theProvider) { super(theMethod, theContext, theProvider, Patch.class, theMethod.getAnnotation(Patch.class).type()); for (ListIterator<Class<?>> iter = Arrays.asList(theMethod.getParameterTypes()).listIterator(); iter.hasNext();) { int nextIndex = iter.nextIndex(); Class<?> next = iter.next(); if (next.equals(PatchTypeEnum.class)) { myPatchTypeParameterIndex = nextIndex; } for (Annotation nextAnnotation : theMethod.getParameterAnnotations()[nextIndex]) { if (nextAnnotation instanceof ResourceParam) { myResourceParamIndex = nextIndex; } } } if (myPatchTypeParameterIndex == -1) { throw new ConfigurationException("Method has no parameter of type " + PatchTypeEnum.class.getName() + " - " + theMethod.toString()); } if (myResourceParamIndex == -1) { throw new ConfigurationException("Method has no parameter with @" + ResourceParam.class.getSimpleName() + " annotation - " + theMethod.toString()); } }
returnTypeFromAnnotation = delete.type(); } else if (patch != null) { returnTypeFromAnnotation = patch.type(); } else if (create != null) { returnTypeFromAnnotation = create.type();
returnTypeFromAnnotation = delete.type(); } else if (patch != null) { returnTypeFromAnnotation = patch.type(); } else if (create != null) { returnTypeFromAnnotation = create.type();