java.lang.reflect.Executable.isAnnotationPresent()方法的使用及代码示例

x33g5p2x  于2022-01-19 转载在 其他  
字(2.0k)|赞(0)|评价(0)|浏览(153)

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

Executable.isAnnotationPresent介绍

暂无

代码示例

代码示例来源:origin: line/armeria

if (constructorOrMethod.isAnnotationPresent(Default.class)) {
  throw new IllegalArgumentException(
      '@' + Default.class.getSimpleName() + " is not supported for: " +

代码示例来源:origin: org.jboss.weld.se/weld-se-shaded

public boolean isAnnotationPresent(Class<? extends Annotation> annotationType) {
  return executable.isAnnotationPresent(annotationType);
}

代码示例来源:origin: weld/core

public boolean isAnnotationPresent(Class<? extends Annotation> annotationType) {
  return executable.isAnnotationPresent(annotationType);
}

代码示例来源:origin: weld/core

public boolean isAnnotationPresent(Class<? extends Annotation> annotationType) {
  return executable.isAnnotationPresent(annotationType);
}

代码示例来源:origin: org.jboss.weld.servlet/weld-servlet-shaded

public boolean isAnnotationPresent(Class<? extends Annotation> annotationType) {
  return executable.isAnnotationPresent(annotationType);
}

代码示例来源:origin: weld/core

public boolean isAnnotationPresent(Class<? extends Annotation> annotationType) {
  return executable.isAnnotationPresent(annotationType);
}

代码示例来源:origin: io.astefanutti.metrics.cdi/metrics-cdi

private <T extends Annotation> Of<T> resolverOf(Class<?> bean, Executable executable, Class<T> metric) {
  if (executable.isAnnotationPresent(metric))
    return elementResolverOf(executable, metric);
  else
    return beanResolverOf(executable, metric, bean);
}

代码示例来源:origin: astefanutti/metrics-cdi

private <T extends Annotation> Of<T> resolverOf(Class<?> bean, Executable executable, Class<T> metric) {
  if (executable.isAnnotationPresent(metric))
    return elementResolverOf(executable, metric);
  else
    return beanResolverOf(executable, metric, bean);
}

相关文章