public String inferName(Method method) { PropertyName prop = method.getAnnotation(PropertyName.class); if (prop != null) { return prop.value(); } return decapitalize(method.getName().substring(3)); }
@PropertyName(FACTORY) void setRequestFactory(String value); }
@PropertyName(TYPE_TOKEN) void setTypeToken(String value); }
@PropertyName(VIOLATIONS) void setViolations(List<ViolationMessage> value); }
@PropertyName("jsonrpc") void setVersion(String version); }
/** * @param value min processing time */ @PropertyName("minTime") void setMinProcessingTime(int value);
/** * Minimum processing time for a message in TimeUnit.MILLISECONDS. * * @return min processing time */ @PropertyName("minTime") int getMinProcessingTime();
/** * @param value total processing time */ @PropertyName("totalTime") void setTotalProcessingTime(long value);
static String getEnumName(JEnumConstant e) { String name; PropertyName annotation = e.getAnnotation(PropertyName.class); if (annotation == null) { name = e.getName(); } else { name = annotation.value(); } return name; }
/** * @param value max processing time */ @PropertyName("maxTime") void setMaxProcessingTime(int value);
/** * @param value average processing time */ @PropertyName("averageTime") void setAverageProcessingTime(Double value);
/** * Average processing time for all messages in TimeUnit.MILLISECONDS. * * @return average processing time */ @PropertyName("averageTime") Double getAverageProcessingTime();
/** * Total processing time for all messages in TimeUnit.MILLISECONDS. * * @return total processing time */ @PropertyName("totalTime") long getTotalProcessingTime();
public String inferName(Method method) { PropertyName prop = method.getAnnotation(PropertyName.class); if (prop != null) { return prop.value(); } return decapitalize(method.getName().substring(3)); }
public String inferName(Method method) { PropertyName prop = method.getAnnotation(PropertyName.class); if (prop != null) { return prop.value(); } return decapitalize(method.getName().substring(3)); }
/** * Maximum processing time for a message in TimeUnit.MILLISECONDS. * * @return max processing time */ @PropertyName("maxTime") int getMaxProcessingTime();
static String getEnumName(JEnumConstant e) { String name; PropertyName annotation = e.getAnnotation(PropertyName.class); if (annotation == null) { name = e.getName(); } else { name = annotation.value(); } return name; }
for (Annotation annotation : parameterAnnotations[i]) { if (PropertyName.class.equals(annotation.annotationType())) { parameterNames[i] = ((PropertyName) annotation).value(); continue parameter; } else if (JsonRpcContent.class.equals(annotation.annotationType())) {
@PropertyName("0") PERSISTED, @PropertyName("1") EPHEMERAL, @PropertyName("2") SYNTHETIC;
/** * EnumMap support. */ private Object getEnum(Class<?> clazz, String token) throws IllegalAccessException { for (Field f : clazz.getFields()) { String fieldName; PropertyName annotation = f.getAnnotation(PropertyName.class); if (annotation != null) { fieldName = annotation.value(); } else { fieldName = f.getName(); } if (token.equals(fieldName)) { f.setAccessible(true); return f.get(null); } } throw new IllegalArgumentException("Cannot find enum " + token + " in type " + clazz.getCanonicalName()); }