public final class BeanRef extends Object
equals(Object)
and
hashCode()
functionality for any two instances of BeanRef.
For example:
BeanRef beanRefA = new BeanRef(String.class, new Annotation[] { new Foo() { ... } });
BeanRef beanRefB = new BeanRef(String.class, new Annotation[] { new Foo() { ... } });
assertTrue(beanRefA.equals(beanRefB)); // should equal true!
Constructor and Description |
---|
BeanRef(Class<?> clazz,
Annotation[] annotations)
Constructs a new instance of BeanRef with the given bean type and qualifiers.
|
Modifier and Type | Method and Description |
---|---|
boolean |
equals(Object o) |
Annotation[] |
getAnnotations()
Return an array of qualifiers associated with this bean.
|
Class<?> |
getClazz()
Return the bean type.
|
int |
hashCode() |
String |
toString() |
public BeanRef(Class<?> clazz, Annotation[] annotations)
clazz
- the bean type.annotations
- an array of qualifiers associated with this bean.public Class<?> getClazz()
Class
representing the type of this bean.public Annotation[] getAnnotations()
Annotation
} representing the qualifiers for this bean.Copyright © 2013-2015 JBoss, a division of Red Hat. All Rights Reserved.