public TransactionMethodBinding(Method theMethod, FhirContext theContext, Object theProvider) { super(null, theMethod, theContext, theProvider); myTransactionParamIndex = -1; int index = 0; for (IParameter next : getParameters()) { if (next instanceof TransactionParameter) { if (myTransactionParamIndex != -1) { throw new ConfigurationException("Method '" + theMethod.getName() + "' in type " + theMethod.getDeclaringClass().getCanonicalName() + " has multiple parameters annotated with the @" + TransactionParam.class + " annotation, exactly one is required for @" + Transaction.class + " methods"); } myTransactionParamIndex = index; myTransactionParamStyle = ((TransactionParameter) next).getParamStyle(); } index++; } if (myTransactionParamIndex == -1) { throw new ConfigurationException("Method '" + theMethod.getName() + "' in type " + theMethod.getDeclaringClass().getCanonicalName() + " does not have a parameter annotated with the @" + TransactionParam.class + " annotation"); } }
public TransactionMethodBinding(Method theMethod, FhirContext theContext, Object theProvider) { super(null, theMethod, theContext, theProvider); myTransactionParamIndex = -1; int index = 0; for (IParameter next : getParameters()) { if (next instanceof TransactionParameter) { if (myTransactionParamIndex != -1) { throw new ConfigurationException("Method '" + theMethod.getName() + "' in type " + theMethod.getDeclaringClass().getCanonicalName() + " has multiple parameters annotated with the @" + TransactionParam.class + " annotation, exactly one is required for @" + Transaction.class + " methods"); } myTransactionParamIndex = index; myTransactionParamStyle = ((TransactionParameter) next).getParamStyle(); } index++; } if (myTransactionParamIndex == -1) { throw new ConfigurationException("Method '" + theMethod.getName() + "' in type " + theMethod.getDeclaringClass().getCanonicalName() + " does not have a parameter annotated with the @" + TransactionParam.class + " annotation"); } }