@Override public <A extends Annotation> A getAnnotation(Class<A> annotClass) { return param.getAnnotation(annotClass); }
@Override public <A extends Annotation> A getAnnotation(Class<A> annotClass) { return param.getAnnotation(annotClass); }
public ParametersImpl(JParameter[] params, boolean[] seenFlag) { this.params = params; this.seenFlag = seenFlag; int n = params.length; offset = new int[n]; isList = new boolean[n]; isArray = new boolean[n]; for (int i = 0; i < n; ++i) { Offset offsetAnnot = params[i].getAnnotation(Offset.class); if (offsetAnnot != null) { offset[i] = offsetAnnot.value(); } JType type = params[i].getType(); if (type.isArray() != null) { isArray[i] = true; } else if (type.isInterface() != null) { JClassType rawType = type.isInterface().getErasedType(); if ("java.util.List".equals(rawType.getQualifiedSourceName())) { isList[i] = true; } } } }
public ParametersImpl(JParameter[] params, boolean[] seenFlag) { this.params = params; this.seenFlag = seenFlag; int n = params.length; offset = new int[n]; isList = new boolean[n]; isArray = new boolean[n]; for (int i = 0; i < n; ++i) { Offset offsetAnnot = params[i].getAnnotation(Offset.class); if (offsetAnnot != null) { offset[i] = offsetAnnot.value(); } JType type = params[i].getType(); if (type.isArray() != null) { isArray[i] = true; } else if (type.isInterface() != null) { JClassType rawType = type.isInterface().getErasedType(); if ("java.util.List".equals(rawType.getQualifiedSourceName())) { isList[i] = true; } } } }
MultiEvent.class.getCanonicalName())) { if (method.getParameters()[0].getAnnotation(EventTypes.class) == null) { logger.log(Type.ERROR, String.format("MultiEvent in method %s.%s must be annotated with @EventTypes.", Class<?>[] classes = method.getParameters()[0].getAnnotation(EventTypes.class).value(); for (Class<?> c1 : classes) { for (Class<?> c2 : classes) { if (method.getParameters()[0].getAnnotation(EventTypes.class) != null) { logger.log(Type.ERROR, String.format(
throws UnableToCompleteException { super(logger, argNumber, params); PluralCount pluralCount = params[argNumber].getAnnotation( PluralCount.class); Class<? extends PluralRule> ruleClass = pluralCount.value(); Offset offsetAnnot = params[argNumber].getAnnotation(Offset.class); int offset = 0; if (offsetAnnot != null) {
throws UnableToCompleteException { super(logger, argNumber, params); PluralCount pluralCount = params[argNumber].getAnnotation( PluralCount.class); Class<? extends PluralRule> ruleClass = pluralCount.value(); Offset offsetAnnot = params[argNumber].getAnnotation(Offset.class); int offset = 0; if (offsetAnnot != null) {
Optional optional = param.getAnnotation(Optional.class); if (optional != null) { argInfo.optional = true; PluralCount pluralCount = param.getAnnotation(PluralCount.class); if (pluralCount != null) { argInfo.isPluralCount = true; Example example = param.getAnnotation(Example.class); if (example != null) { argInfo.example = example.value(); Select select = param.getAnnotation(Select.class); if (select != null) { argInfo.isSelect = true;
Optional optional = param.getAnnotation(Optional.class); if (optional != null) { argInfo.optional = true; PluralCount pluralCount = param.getAnnotation(PluralCount.class); if (pluralCount != null) { argInfo.isPluralCount = true; Example example = param.getAnnotation(Example.class); if (example != null) { argInfo.example = example.value(); Select select = param.getAnnotation(Select.class); if (select != null) { argInfo.isSelect = true;
PropertyName annotation = param.getAnnotation(PropertyName.class); String propertyName = annotation == null ? param.getName() : annotation.value(); boolean isContent = param.isAnnotationPresent(JsonRpcContent.class);
if (getFirstParameterType(method).equals(MultiEvent.class.getCanonicalName())) { isMultiEvent = true; for (Class<?> type : method.getParameters()[0].getAnnotation(EventTypes.class).value()) { paramTypes.add(type.getCanonicalName());
PropertyName annotation = param.getAnnotation(PropertyName.class); String propertyName = annotation == null ? param.getName() : annotation.value(); boolean isContent = param.isAnnotationPresent(JsonRpcContent.class);
creatorParameters.put( creators.get( 0 ).getParameters()[i].getAnnotation( JsonProperty.class ).value(), creators .get( creators.size() - 1 ).getParameters()[i] );
PluralCount pluralCount = params[i].getAnnotation(PluralCount.class); Select select = params[i].getAnnotation(Select.class); if (pluralCount != null && select != null) { throw error(logger, params[i].getName() + " cannot be both @PluralCount" Optional optional = params[i].getAnnotation(Optional.class); Select select = params[i].getAnnotation(Select.class); if (optional == null && select == null) { throw error(logger, "Required argument " + i + " not present: "
PluralCount pluralCount = params[i].getAnnotation(PluralCount.class); Select select = params[i].getAnnotation(Select.class); if (pluralCount != null && select != null) { throw error(logger, params[i].getName() + " cannot be both @PluralCount" Optional optional = params[i].getAnnotation(Optional.class); Select select = params[i].getAnnotation(Select.class); if (optional == null && select == null) { throw error(logger, "Required argument " + i + " not present: "