|
Errai 3.0.1-SNAPSHOT | |||||||||
PREV CLASS NEXT CLASS | FRAMES NO FRAMES | |||||||||
SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD |
java.lang.Objectorg.jboss.errai.ioc.client.container.BeanRef
public final class BeanRef
This class is used as a resolver class within the bean manager to represent a unique bean definition
for a given type and combination of qualifiers. It provides consistent equals(Object)
and
hashCode()
functionality for any two instances of BeanRef.
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 Summary | |
---|---|
BeanRef(Class<?> clazz,
Annotation[] annotations)
Constructs a new instance of BeanRef with the given bean type and qualifiers. |
Method Summary | |
---|---|
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()
|
Methods inherited from class java.lang.Object |
---|
clone, finalize, getClass, notify, notifyAll, wait, wait, wait |
Constructor Detail |
---|
public BeanRef(Class<?> clazz, Annotation[] annotations)
clazz
- the bean type.annotations
- an array of qualifiers associated with this bean.Method Detail |
---|
public Class<?> getClazz()
Class
representing the type of this bean.public Annotation[] getAnnotations()
Annotation
} representing the qualifiers for this bean.public boolean equals(Object o)
equals
in class Object
public int hashCode()
hashCode
in class Object
public String toString()
toString
in class Object
|
Errai 3.0.1-SNAPSHOT | |||||||||
PREV CLASS NEXT CLASS | FRAMES NO FRAMES | |||||||||
SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD |