MatrixParam matrix = null;
PathParam path = null;
QueryParam query = null;
HeaderParam header = null;
CookieParam cookie = null;
FormParam form = null;
Context context = null;
Injectable injectable = null;
int annotationsCounter = 0;
for (int i = 0; i < annotations.length; ++i) {
if (annotations[i].annotationType().equals(MatrixParam.class)) {
matrix = (MatrixParam)annotations[i];
++annotationsCounter;
} else if (annotations[i].annotationType().equals(PathParam.class)) {
path = (PathParam)annotations[i];
++annotationsCounter;
} else if (annotations[i].annotationType().equals(QueryParam.class)) {
query = (QueryParam)annotations[i];
++annotationsCounter;
} else if (annotations[i].annotationType().equals(HeaderParam.class)) {
header = (HeaderParam)annotations[i];
++annotationsCounter;
} else if (annotations[i].annotationType().equals(CookieParam.class)) {
cookie = (CookieParam)annotations[i];
++annotationsCounter;
} else if (annotations[i].annotationType().equals(FormParam.class)) {
form = (FormParam)annotations[i];
++annotationsCounter;
} else if (annotations[i].annotationType().equals(Context.class)) {
context = (Context)annotations[i];
++annotationsCounter;
} else if (annotations[i].annotationType().equals(Encoded.class)) {
encoded = true;
} else if (annotations[i].annotationType().equals(DefaultValue.class)) {
defaultValue = ((DefaultValue)annotations[i]).value();
}
}
if (annotationsCounter > 1) {
throw new IllegalStateException(Messages
.getMessage("conflictingParameterAnnotations", member.getName())); //$NON-NLS-1$
}
if (matrix != null) {
injectable =
createMatrixParam(matrix.value(), classType, genericType, annotations, member);
} else if (path != null) {
injectable = createPathParam(path.value(), classType, genericType, annotations, member);
} else if (query != null) {
injectable =
createQueryParam(query.value(), classType, genericType, annotations, member);
} else if (header != null) {
injectable =
createHeaderParam(header.value(), classType, genericType, annotations, member);
} else if (cookie != null) {
injectable =
createCookieParam(cookie.value(), classType, genericType, annotations, member);
} else if (form != null) {
injectable = createFormParam(form.value(), classType, genericType, annotations, member);
} else if (context != null) {
injectable = createContextParam(classType, annotations, member);
} else {