org.jboss.errai.codegen.meta.MetaClass.getParametersAnnotatedWith()方法的使用及代码示例

x33g5p2x  于2022-01-25 转载在 其他  
字(1.5k)|赞(0)|评价(0)|浏览(92)

本文整理了Java中org.jboss.errai.codegen.meta.MetaClass.getParametersAnnotatedWith()方法的一些代码示例,展示了MetaClass.getParametersAnnotatedWith()的具体用法。这些代码示例主要来源于Github/Stackoverflow/Maven等平台,是从一些精选项目中提取出来的代码,具有较强的参考意义,能在一定程度帮忙到你。MetaClass.getParametersAnnotatedWith()方法的具体详情如下:
包路径:org.jboss.errai.codegen.meta.MetaClass
类名称:MetaClass
方法名:getParametersAnnotatedWith

MetaClass.getParametersAnnotatedWith介绍

暂无

代码示例

代码示例来源:origin: errai/errai

@SuppressWarnings({ "unchecked", "rawtypes" })
private List<HasAnnotations> getAnnotatedWithForElementType(final MetaClass type, final ElementType elemType, final Class<? extends Annotation> annoType) {
 final List annotatedItems;
 switch (elemType) {
 case FIELD:
  annotatedItems = type.getFieldsAnnotatedWith(annoType);
  break;
 case METHOD:
  annotatedItems = type.getMethodsAnnotatedWith(annoType);
  break;
 case PARAMETER:
  annotatedItems = type.getParametersAnnotatedWith(annoType);
  break;
 case TYPE:
  annotatedItems = (type.isAnnotationPresent(annoType)) ? Collections.singletonList(type) : Collections.emptyList();
  break;
 default:
  throw new RuntimeException("Not yet implemented.");
 }
 return annotatedItems;
}

代码示例来源:origin: org.jboss.errai/errai-data-binding

final List<MetaParameter> modelParameters = decorable.getDecorableDeclaringType().getParametersAnnotatedWith(Model.class);
if (!modelParameters.isEmpty()) {
 throw new GenerationException(

代码示例来源:origin: errai/errai

final List<MetaParameter> modelParameters = decorable.getDecorableDeclaringType().getParametersAnnotatedWith(Model.class);
if (!modelParameters.isEmpty()) {
 throw new GenerationException(

相关文章