javax.enterprise.inject.spi.AnnotatedCallable.isAnnotationPresent()方法的使用及代码示例

x33g5p2x  于2022-01-16 转载在 其他  
字(2.6k)|赞(0)|评价(0)|浏览(93)

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

AnnotatedCallable.isAnnotationPresent介绍

暂无

代码示例

代码示例来源:origin: hibernate/hibernate-validator

@Override
public boolean isAnnotationPresent(Class<? extends Annotation> annotationType) {
  if ( MethodValidated.class.equals( annotationType ) ) {
    return true;
  }
  else {
    return wrappedCallable.isAnnotationPresent( annotationType );
  }
}

代码示例来源:origin: org.jboss.seam.jms/seam-jms

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

代码示例来源:origin: org.hibernate.validator/hibernate-validator-cdi

@Override
public boolean isAnnotationPresent(Class<? extends Annotation> annotationType) {
  if ( MethodValidated.class.equals( annotationType ) ) {
    return true;
  }
  else {
    return wrappedCallable.isAnnotationPresent( annotationType );
  }
}

代码示例来源:origin: org.apache.tomee.patch/bval-jsr

private static <A> boolean hasValidationAnnotation(
  final Collection<? extends AnnotatedCallable<? super A>> methods) {
  return methods.stream().anyMatch(m -> m.isAnnotationPresent(ValidateOnExecution.class));
}

代码示例来源:origin: org.apache.bval/bval-jsr

private static <A> boolean hasValidationAnnotation(
  final Collection<? extends AnnotatedCallable<? super A>> methods) {
  return methods.stream().anyMatch(m -> m.isAnnotationPresent(ValidateOnExecution.class));
}

代码示例来源:origin: org.apache.geronimo/geronimo-metrics

annotatedType.getAnnotation(Counted.class));
if (counted != null) {
  final boolean isMethod = method.isAnnotationPresent(Counted.class);
  final String name = Names.findName(javaClass, javaMember, isMethod ? counted.name() : "", counted.absolute(),
      ofNullable(annotatedType.getAnnotation(Counted.class)).map(Counted::name).orElse(""));
  final boolean isMethod = method.isAnnotationPresent(Timed.class);
  final String name = Names.findName(javaClass, javaMember, isMethod ? timed.name() : "", timed.absolute(),
      ofNullable(annotatedType.getAnnotation(Timed.class)).map(Timed::name).orElse(""));
    .orElseGet(() -> annotatedType.getAnnotation(org.eclipse.microprofile.metrics.annotation.Metered.class));
if (metered != null) {
  final boolean isMethod = method.isAnnotationPresent(Metered.class);
  final String name = Names.findName(javaClass, javaMember, isMethod ? metered.name() : "", metered.absolute(),
      ofNullable(annotatedType.getAnnotation(Metered.class)).map(Metered::name).orElse(""));

相关文章