public class SpringBean extends java.lang.Object implements IInjectedDependency
Constructor and Description |
---|
SpringBean(SpringConfigEntity configEntity,
java.lang.String id)
Creates a new instance with the given ID.
|
SpringBean(SpringConfigEntity configEntity,
java.lang.String id,
java.lang.String className)
Creates a new instance with the given ID and className.
|
Modifier and Type | Method and Description |
---|---|
void |
addBeanReference(SpringBeanReference beanReference) |
boolean |
equals(java.lang.Object obj) |
java.util.Optional<SpringBeanReference> |
findBeanReference(java.util.function.Predicate<SpringBeanReference> matcher) |
java.util.Optional<SpringBeanReference> |
getBeanReferenceById(java.lang.String beanId) |
ClassDefinition |
getClassDefinition() |
ClassInformation |
getClassInformation()
Returns the implementation class associated with this bean
or null if the class has not been set or resolved yet.
|
java.lang.String |
getClassName()
Returns the associated full qualified class name or null if it
has not been set.
|
SpringConfigEntity |
getConfigEntity() |
java.lang.String |
getId() |
java.util.List<SpringBeanReference> |
getReferredBeans() |
boolean |
hasClassDefinition() |
int |
hashCode() |
boolean |
isClassResolved()
Returns whether or not this bean has an associated class and
this class has already been resolved to either null (not found)
or a
ClassInformation object. |
void |
setClassDefinition(ClassDefinition classDefinition) |
void |
setClassName(java.lang.String className) |
java.lang.String |
toString() |
public SpringBean(SpringConfigEntity configEntity, java.lang.String id)
configEntity
- The configuration this bean belongs to (must not be null).id
- The unique bean identifier (must not be null).java.lang.IllegalArgumentException
- If the given id is null.public SpringBean(SpringConfigEntity configEntity, java.lang.String id, java.lang.String className)
configEntity
- The configuration this bean belongs to (must not be null).id
- The unique bean identifier (must not be null).className
- The name of the class that implements the bean (must not be null).java.lang.IllegalArgumentException
- If the given id is null.public java.lang.String getClassName()
public void setClassName(java.lang.String className)
public SpringConfigEntity getConfigEntity()
public java.lang.String getId()
public ClassInformation getClassInformation()
getClassInformation
in interface IInjectedDependency
public ClassDefinition getClassDefinition()
public void setClassDefinition(ClassDefinition classDefinition)
public java.util.List<SpringBeanReference> getReferredBeans()
public void addBeanReference(SpringBeanReference beanReference)
public java.util.Optional<SpringBeanReference> getBeanReferenceById(java.lang.String beanId)
public java.util.Optional<SpringBeanReference> findBeanReference(java.util.function.Predicate<SpringBeanReference> matcher)
public boolean hasClassDefinition()
public boolean isClassResolved()
ClassInformation
object.public boolean equals(java.lang.Object obj)
equals
in class java.lang.Object
public int hashCode()
hashCode
in class java.lang.Object
public java.lang.String toString()
toString
in class java.lang.Object