本文整理了Java中javax.enterprise.inject.spi.Decorator.getBeanClass()
方法的一些代码示例,展示了Decorator.getBeanClass()
的具体用法。这些代码示例主要来源于Github
/Stackoverflow
/Maven
等平台,是从一些精选项目中提取出来的代码,具有较强的参考意义,能在一定程度帮忙到你。Decorator.getBeanClass()
方法的具体详情如下:
包路径:javax.enterprise.inject.spi.Decorator
类名称:Decorator
方法名:getBeanClass
暂无
代码示例来源:origin: org.jboss.cdi.tck/cdi-tck-impl
private static boolean decoratorCollectionMatches(Collection<Decorator<?>> decorators, Class<?>... types) {
Set<Class<?>> typeSet = new HashSet<Class<?>>(Arrays.asList(types));
for (Decorator<?> decorator : decorators) {
typeSet.remove(decorator.getBeanClass());
}
return typeSet.isEmpty();
}
代码示例来源:origin: org.jboss.jsr299.tck/jsr299-tck-impl
private static boolean decoratorCollectionMatches(Collection<Decorator<?>> decorators, Class<?>... types)
{
Set<Class<?>> typeSet = new HashSet<Class<?>>(Arrays.asList(types));
for (Decorator<?> decorator : decorators)
{
typeSet.remove(decorator.getBeanClass());
}
return typeSet.isEmpty();
}
代码示例来源:origin: org.apache.openwebbeans/openwebbeans-impl
@Override
public int compare(Decorator<T> o1, Decorator<T> o2)
{
if (o1.equals(o2))
{
return 0;
}
else
{
Class<?> o1Clazz = o1.getBeanClass();
Class<?> o2Clazz = o2.getBeanClass();
return webBeansContext.getDecoratorsManager().compare(o1Clazz, o2Clazz);
}
}
代码示例来源:origin: org.jboss.cdi.tck/cdi-tck-impl
protected void checkDecorator(Decorator<?> decorator, Class<?> beanClass, Set<Type> decoratedTypes, Type delegateType) {
assertEquals(decorator.getBeanClass(), beanClass);
assertEquals(decorator.getDecoratedTypes(), decoratedTypes);
assertEquals(decorator.getDelegateType(), delegateType);
}
代码示例来源:origin: weld/core
private void validateEnabledDecoratorClasses(BeanManagerImpl beanManager, BeanDeployment deployment) {
BeansXml beansXml = deployment.getBeanDeploymentArchive().getBeansXml();
if (beansXml != null && !beansXml.getEnabledDecorators().isEmpty()) {
Set<String> decoratorBeanClasses = new HashSet<String>();
for (Decorator<?> bean : beanManager.getDynamicAccessibleDecorators()) {
decoratorBeanClasses.add(bean.getBeanClass().getName());
}
for (Metadata<String> decoratorClassName : beansXml.getEnabledDecorators()) {
if (!decoratorBeanClasses.contains(decoratorClassName.getValue())) {
throw ValidatorLogger.LOG.decoratorClassNotBeanClassOfDecorator(decoratorClassName.getValue(), WeldCollections.toMultiRowString(decoratorBeanClasses));
}
}
}
}
代码示例来源:origin: org.jboss.weld.se/weld-se-shaded
private void validateEnabledDecoratorClasses(BeanManagerImpl beanManager, BeanDeployment deployment) {
BeansXml beansXml = deployment.getBeanDeploymentArchive().getBeansXml();
if (beansXml != null && !beansXml.getEnabledDecorators().isEmpty()) {
Set<String> decoratorBeanClasses = new HashSet<String>();
for (Decorator<?> bean : beanManager.getDynamicAccessibleDecorators()) {
decoratorBeanClasses.add(bean.getBeanClass().getName());
}
for (Metadata<String> decoratorClassName : beansXml.getEnabledDecorators()) {
if (!decoratorBeanClasses.contains(decoratorClassName.getValue())) {
throw ValidatorLogger.LOG.decoratorClassNotBeanClassOfDecorator(decoratorClassName.getValue(), WeldCollections.toMultiRowString(decoratorBeanClasses));
}
}
}
}
代码示例来源:origin: org.jboss.weld.se/weld-se
private void validateEnabledDecoratorClasses(BeanManagerImpl beanManager, BeanDeployment deployment) {
BeansXml beansXml = deployment.getBeanDeploymentArchive().getBeansXml();
if (beansXml != null && !beansXml.getEnabledDecorators().isEmpty()) {
Set<String> decoratorBeanClasses = new HashSet<String>();
for (Decorator<?> bean : beanManager.getDynamicAccessibleDecorators()) {
decoratorBeanClasses.add(bean.getBeanClass().getName());
}
for (Metadata<String> decoratorClassName : beansXml.getEnabledDecorators()) {
if (!decoratorBeanClasses.contains(decoratorClassName.getValue())) {
throw ValidatorLogger.LOG.decoratorClassNotBeanClassOfDecorator(decoratorClassName.getValue(), WeldCollections.toMultiRowString(decoratorBeanClasses));
}
}
}
}
代码示例来源:origin: weld/core
private void validateEnabledDecoratorClasses(BeanManagerImpl beanManager, BeanDeployment deployment) {
BeansXml beansXml = deployment.getBeanDeploymentArchive().getBeansXml();
if (beansXml != null && !beansXml.getEnabledDecorators().isEmpty()) {
Set<String> decoratorBeanClasses = new HashSet<String>();
for (Decorator<?> bean : beanManager.getDynamicAccessibleDecorators()) {
decoratorBeanClasses.add(bean.getBeanClass().getName());
}
for (Metadata<String> decoratorClassName : beansXml.getEnabledDecorators()) {
if (!decoratorBeanClasses.contains(decoratorClassName.getValue())) {
throw ValidatorLogger.LOG.decoratorClassNotBeanClassOfDecorator(decoratorClassName.getValue(), WeldCollections.toMultiRowString(decoratorBeanClasses));
}
}
}
}
代码示例来源:origin: weld/core
private CustomDecoratorWrapper(Decorator<T> delegate, BeanManagerImpl beanManager) {
this.delegate = delegate;
this.weldClass = beanManager.getServices().get(ClassTransformer.class).getEnhancedAnnotatedType(Reflections.<Class<T>>cast(delegate.getBeanClass()), beanManager.getId());
this.decoratedMethods = new DecoratedMethods(beanManager, this);
}
代码示例来源:origin: weld/core
private CustomDecoratorWrapper(Decorator<T> delegate, BeanManagerImpl beanManager) {
this.delegate = delegate;
this.weldClass = beanManager.getServices().get(ClassTransformer.class).getEnhancedAnnotatedType(Reflections.<Class<T>>cast(delegate.getBeanClass()), beanManager.getId());
this.decoratedMethods = new DecoratedMethods(beanManager, this);
}
代码示例来源:origin: weld/core
private CustomDecoratorWrapper(Decorator<T> delegate, BeanManagerImpl beanManager) {
this.delegate = delegate;
this.weldClass = beanManager.getServices().get(ClassTransformer.class).getEnhancedAnnotatedType(Reflections.<Class<T>>cast(delegate.getBeanClass()), beanManager.getId());
this.decoratedMethods = new DecoratedMethods(beanManager, this);
}
代码示例来源:origin: org.jboss.weld.se/weld-se
private CustomDecoratorWrapper(Decorator<T> delegate, BeanManagerImpl beanManager) {
this.delegate = delegate;
this.weldClass = beanManager.getServices().get(ClassTransformer.class).getEnhancedAnnotatedType(Reflections.<Class<T>>cast(delegate.getBeanClass()), beanManager.getId());
this.decoratedMethods = new DecoratedMethods(beanManager, this);
}
代码示例来源:origin: org.jboss.weld.se/weld-se-shaded
private CustomDecoratorWrapper(Decorator<T> delegate, BeanManagerImpl beanManager) {
this.delegate = delegate;
this.weldClass = beanManager.getServices().get(ClassTransformer.class).getEnhancedAnnotatedType(Reflections.<Class<T>>cast(delegate.getBeanClass()), beanManager.getId());
this.decoratedMethods = new DecoratedMethods(beanManager, this);
}
代码示例来源:origin: org.jboss.weld.servlet/weld-servlet-shaded
private CustomDecoratorWrapper(Decorator<T> delegate, BeanManagerImpl beanManager) {
this.delegate = delegate;
this.weldClass = beanManager.getServices().get(ClassTransformer.class).getEnhancedAnnotatedType(Reflections.<Class<T>>cast(delegate.getBeanClass()), beanManager.getId());
this.decoratedMethods = new DecoratedMethods(beanManager, this);
}
代码示例来源:origin: weld/core
@Override
protected boolean matches(Resolvable resolvable, Decorator<?> bean) {
return rules.matches(Collections.singleton(bean.getDelegateType()), resolvable.getTypes())
&& Beans.containsAllQualifiers(QualifierInstance.of(bean.getDelegateQualifiers(), getStore()), resolvable.getQualifiers())
&& getBeanManager().getEnabled().isDecoratorEnabled(bean.getBeanClass());
}
代码示例来源:origin: org.jboss.weld.servlet/weld-servlet-shaded
@Override
protected boolean matches(Resolvable resolvable, Decorator<?> bean) {
return rules.matches(Collections.singleton(bean.getDelegateType()), resolvable.getTypes())
&& Beans.containsAllQualifiers(QualifierInstance.of(bean.getDelegateQualifiers(), getStore()), resolvable.getQualifiers())
&& getBeanManager().getEnabled().isDecoratorEnabled(bean.getBeanClass());
}
代码示例来源:origin: weld/core
@Override
protected boolean matches(Resolvable resolvable, Decorator<?> bean) {
return rules.matches(Collections.singleton(bean.getDelegateType()), resolvable.getTypes())
&& Beans.containsAllQualifiers(QualifierInstance.of(bean.getDelegateQualifiers(), getStore()), resolvable.getQualifiers())
&& getBeanManager().getEnabled().isDecoratorEnabled(bean.getBeanClass());
}
代码示例来源:origin: org.jboss.weld.se/weld-se
@Override
protected boolean matches(Resolvable resolvable, Decorator<?> bean) {
return rules.matches(Collections.singleton(bean.getDelegateType()), resolvable.getTypes())
&& Beans.containsAllQualifiers(QualifierInstance.of(bean.getDelegateQualifiers(), getStore()), resolvable.getQualifiers())
&& getBeanManager().getEnabled().isDecoratorEnabled(bean.getBeanClass());
}
代码示例来源:origin: weld/core
@Override
protected boolean matches(Resolvable resolvable, Decorator<?> bean) {
return rules.matches(Collections.singleton(bean.getDelegateType()), resolvable.getTypes())
&& Beans.containsAllQualifiers(QualifierInstance.of(bean.getDelegateQualifiers(), getStore()), resolvable.getQualifiers())
&& getBeanManager().getEnabled().isDecoratorEnabled(bean.getBeanClass());
}
代码示例来源:origin: org.jboss.weld.se/weld-se-shaded
@Override
protected boolean matches(Resolvable resolvable, Decorator<?> bean) {
return rules.matches(Collections.singleton(bean.getDelegateType()), resolvable.getTypes())
&& Beans.containsAllQualifiers(QualifierInstance.of(bean.getDelegateQualifiers(), getStore()), resolvable.getQualifiers())
&& getBeanManager().getEnabled().isDecoratorEnabled(bean.getBeanClass());
}
内容来源于网络,如有侵权,请联系作者删除!