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

x33g5p2x  于11个月前 转载在 其他  
字(9.1k)|赞(0)|评价(0)|浏览(26)

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

AnnotatedMethod.getDeclaringType介绍

暂无

代码示例

代码示例来源:origin: com.caucho/resin

public boolean isMatch(AnnotatedMethod<?> method)
{
 if (! method.getJavaMember().getName().equals(_methodName))
  return false;
 else if (method.getDeclaringType().getJavaClass().getName().equals(_className)
      || _className == null)
  return true;
 else
  return false;
}

代码示例来源:origin: com.caucho/resin

public boolean isMatch(AnnotatedMethod<?> method)
{
 if (! method.getJavaMember().getName().equals(_methodName))
  return false;
 else if (method.getDeclaringType().getJavaClass().getName().equals(_className)
      || _className == null)
  return true;
 else
  return false;
}

代码示例来源:origin: org.apache.openwebbeans/openwebbeans-impl

private void validateDisposalMethod(AnnotatedType declaringType, AnnotatedMethod<? super P> annotatedMethod)
{
  if (!annotatedMethod.getDeclaringType().equals(declaringType))
  {
    throw new WebBeansConfigurationException("Producer method component of the disposal method : "
        + annotatedMethod.getJavaMember().getName() + " in class : "
        + annotatedMethod.getDeclaringType().getJavaClass() + " must be in the same class!");
  }
  checkDisposalMethod(annotatedMethod);
}

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

@Override
public <X> MethodProducerFactory<X> getProducerFactory(AnnotatedMethod<? super X> method, Bean<X> declaringBean) {
  BeanManagerImpl manager = BeanManagerLookupService.lookupBeanManager(method.getDeclaringType().getJavaClass(), this);
  return new MethodProducerFactory<X>(method, declaringBean, manager);
}

代码示例来源:origin: org.apache.deltaspike.modules/deltaspike-security-module-impl

void registerSecuredMethods()
{
  for (AnnotatedMethod<?> method : securedMethods)
  {
    registerSecuredMethod(method.getDeclaringType().getJavaClass(), method.getJavaMember());
  }
}

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

@Override
public <X> MethodProducerFactory<X> getProducerFactory(AnnotatedMethod<? super X> method, Bean<X> declaringBean) {
  BeanManagerImpl manager = BeanManagerLookupService.lookupBeanManager(method.getDeclaringType().getJavaClass(), this);
  return new MethodProducerFactory<X>(method, declaringBean, manager);
}

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

@Override
public <X> MethodProducerFactory<X> getProducerFactory(AnnotatedMethod<? super X> method, Bean<X> declaringBean) {
  BeanManagerImpl manager = BeanManagerLookupService.lookupBeanManager(method.getDeclaringType().getJavaClass(), this);
  return new MethodProducerFactory<X>(method, declaringBean, manager);
}

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

void registerSecuredMethods()
{
  for (AnnotatedMethod<?> method : securedMethods)
  {
    registerSecuredMethod(method.getDeclaringType().getJavaClass(), method.getJavaMember());
  }
}

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

@Override
public <X> MethodProducerFactory<X> getProducerFactory(AnnotatedMethod<? super X> method, Bean<X> declaringBean) {
  BeanManagerImpl manager = BeanManagerLookupService.lookupBeanManager(method.getDeclaringType().getJavaClass(), this);
  return new MethodProducerFactory<X>(method, declaringBean, manager);
}

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

@Override
public <X> MethodProducerFactory<X> getProducerFactory(AnnotatedMethod<? super X> method, Bean<X> declaringBean) {
  BeanManagerImpl manager = BeanManagerLookupService.lookupBeanManager(method.getDeclaringType().getJavaClass(), this);
  return new MethodProducerFactory<X>(method, declaringBean, manager);
}

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

public static String formatAnnotatedMethod(AnnotatedMethod<?> method) {
  return Formats.formatSimpleClassName(method) + " " + Formats.addSpaceIfNeeded(Formats.formatAnnotations(method.getAnnotations()))
      + Formats.addSpaceIfNeeded(Formats.formatModifiers(method.getJavaMember().getModifiers())) + method.getDeclaringType().getJavaClass().getName() + "."
      + method.getJavaMember().getName() + Formats.formatAsFormalParameterList(method.getParameters());
}

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

public static String formatAnnotatedMethod(AnnotatedMethod<?> method) {
  return Formats.formatSimpleClassName(method) + " " + Formats.addSpaceIfNeeded(Formats.formatAnnotations(method.getAnnotations()))
      + Formats.addSpaceIfNeeded(Formats.formatModifiers(method.getJavaMember().getModifiers())) + method.getDeclaringType().getJavaClass().getName() + "."
      + method.getJavaMember().getName() + Formats.formatAsFormalParameterList(method.getParameters());
}

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

public static String formatAnnotatedMethod(AnnotatedMethod<?> method) {
  return Formats.formatSimpleClassName(method) + " " + Formats.addSpaceIfNeeded(Formats.formatAnnotations(method.getAnnotations()))
      + Formats.addSpaceIfNeeded(Formats.formatModifiers(method.getJavaMember().getModifiers())) + method.getDeclaringType().getJavaClass().getName() + "."
      + method.getJavaMember().getName() + Formats.formatAsFormalParameterList(method.getParameters());
}

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

public static String formatAnnotatedMethod(AnnotatedMethod<?> method) {
  return Formats.formatSimpleClassName(method) + " " + Formats.addSpaceIfNeeded(Formats.formatAnnotations(method.getAnnotations()))
      + Formats.addSpaceIfNeeded(Formats.formatModifiers(method.getJavaMember().getModifiers())) + method.getDeclaringType().getJavaClass().getName() + "."
      + method.getJavaMember().getName() + Formats.formatAsFormalParameterList(method.getParameters());
}

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

public static String formatAnnotatedMethod(AnnotatedMethod<?> method) {
  return Formats.formatSimpleClassName(method) + " " + Formats.addSpaceIfNeeded(Formats.formatAnnotations(method.getAnnotations()))
      + Formats.addSpaceIfNeeded(Formats.formatModifiers(method.getJavaMember().getModifiers())) + method.getDeclaringType().getJavaClass().getName() + "."
      + method.getJavaMember().getName() + Formats.formatAsFormalParameterList(method.getParameters());
}

代码示例来源:origin: io.smallrye/smallrye-fault-tolerance

public GenericConfig(Class<X> annotationType, AnnotatedMethod<?> annotatedMethod) {
  this(annotatedMethod.getJavaMember(), annotatedMethod,
      annotatedMethod.isAnnotationPresent(annotationType) ? annotatedMethod.getAnnotation(annotationType)
          : annotatedMethod.getDeclaringType().getAnnotation(annotationType),
      annotatedMethod.isAnnotationPresent(annotationType) ? ElementType.METHOD : ElementType.TYPE);
}

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

<T, X> void registerGenericBeanObserverMethod(@Observes ProcessObserverMethod<T, X> event)
{
 AnnotatedType<X> declaringType = event.getAnnotatedMethod().getDeclaringType();
 if (declaringType.isAnnotationPresent(GenericConfiguration.class))
 {
   AnnotatedMethod<X> method = event.getAnnotatedMethod();
   Class<? extends Annotation> genericConfigurationType = declaringType.getAnnotation(GenericConfiguration.class).value();
   genericBeanObserverMethods.put(genericConfigurationType, new ObserverMethodHolder<X, T>(method, event.getObserverMethod()));
 }
}

代码示例来源:origin: io.smallrye/smallrye-fault-tolerance

public static FaultToleranceOperation of(AnnotatedMethod<?> annotatedMethod) {
  return new FaultToleranceOperation(annotatedMethod.getDeclaringType().getJavaClass(), annotatedMethod.getJavaMember(),
                    isAsync(annotatedMethod),
                    getConfig(Bulkhead.class, annotatedMethod, BulkheadConfig::new),
                    getConfig(CircuitBreaker.class, annotatedMethod, CircuitBreakerConfig::new),
                    getConfig(Fallback.class, annotatedMethod, FallbackConfig::new),
                    getConfig(Retry.class, annotatedMethod, RetryConfig::new),
                    getConfig(Timeout.class, annotatedMethod, TimeoutConfig::new));
}

代码示例来源:origin: org.agorava/solder-generics-impl

<T, X> void registerGenericBeanObserverMethod(@Observes ProcessObserverMethod<T, X> event) {
  if (event.getAnnotatedMethod() == null) {
    return;
  }
  AnnotatedType<X> declaringType = event.getAnnotatedMethod().getDeclaringType();
  if (declaringType.isAnnotationPresent(GenericConfiguration.class)) {
    AnnotatedMethod<X> method = event.getAnnotatedMethod();
    Class<? extends Annotation> genericConfigurationType = declaringType.getAnnotation(GenericConfiguration.class).value();
    genericBeanObserverMethods.put(genericConfigurationType, new ObserverMethodHolder<X, T>(method, event.getObserverMethod()));
  }
}

代码示例来源:origin: org.agorava/solder-generics-impl

<X, T> void registerGenericBeanProducerMethod(@Observes ProcessProducerMethod<X, T> event) {
  AnnotatedType<X> declaringType = event.getAnnotatedProducerMethod().getDeclaringType();
  Annotation genericConfiguration = getGenericConfiguration(event.getAnnotated());
  if (declaringType.isAnnotationPresent(GenericConfiguration.class)) {
    genericBeanProducerMethods.put(declaringType.getAnnotation(GenericConfiguration.class).value(), getProducerMethodHolder(event));
  } else if (genericConfiguration != null) {
    if (validateGenericProducer(genericConfiguration, event.getBean(), event.getAnnotatedProducerMethod())) {
      genericProducerBeans.put(event.getAnnotatedProducerMethod(), event.getBean());
    }
  }
}

相关文章