private JDefinedClass createCustomHttpMethodAnnotation(final String httpMethod)
throws JClassAlreadyExistsException
{
final JPackage pkg = codeModel._package(getSupportPackage());
final JDefinedClass annotationClazz = pkg._annotationTypeDeclaration(httpMethod);
annotationClazz.annotate(Target.class).param("value", ElementType.METHOD);
annotationClazz.annotate(Retention.class).param("value", RetentionPolicy.RUNTIME);
annotationClazz.annotate(HttpMethod.class).param("value", httpMethod);
annotationClazz.javadoc().add("Custom JAX-RS support for HTTP " + httpMethod + ".");
httpMethodAnnotations.put(httpMethod.toUpperCase(), annotationClazz);
return annotationClazz;
}
Context.java 文件源码
java
阅读 29
收藏 0
点赞 0
评论 0
项目:aml
作者:
评论列表
文章目录