Constructor and Description |
---|
InjecteeImpl() |
Modifier and Type | Method and Description |
---|---|
boolean |
equals(Object o) |
Class<?> |
getInjecteeClass()
Returns the parent class for this injectee.
|
ForeignDescriptor |
getInjecteeDescriptor()
This method returns foreign descriptor of the current injectee that means that the DI provider is able to store its
specific descriptor and that use it in the descriptor processing.
|
AnnotatedElement |
getParent()
If this Injectee is in a constructor this will return the constructor being injected into.
|
Class<? extends Annotation> |
getParentClassScope()
This method returns scope in which the parent class is registered.
|
int |
getPosition()
If this Injectee is a constructor or method parameter, this will return the index of the parameter.
|
Set<Annotation> |
getRequiredQualifiers()
This is the set of required qualifiers for this injectee.
|
Type |
getRequiredType()
This is the required type of the injectee.
|
int |
hashCode() |
boolean |
isFactory()
This method returns
true if the injectee value is provided using Supplier . |
boolean |
isOptional()
This method returns
true if this injection point is annotated with VOptional. |
boolean |
isProvider()
This method returns
true if the injectee value is provided using Provider . |
void |
setFactory(boolean factory)
Sets a flag whether the injectee is a factory.
|
void |
setInjecteeClass(Class<?> injecteeClass)
Sets type of the injectee.
|
void |
setInjecteeDescriptor(ForeignDescriptor injecteeDescriptor)
Sets the descriptor for this Injectee.
|
void |
setOptional(boolean optional)
Sets whether or not this Injectee should be considered optional.
|
void |
setParent(AnnotatedElement parent)
This setter sets both the parent and the injecteeClass fields.
|
void |
setParentClassScope(Class<? extends Annotation> parentClassScope)
Sets the scope in which the parent class is registered.
|
void |
setPosition(int position)
Sets the position of this Injectee.
|
void |
setProvider(boolean provider)
Sets a flag whether the injectee is a provider.
|
void |
setRequiredQualifiers(Set<Annotation> requiredQualifiers)
Sets the required qualifiers for this Injectee.
|
void |
setRequiredType(Type requiredType)
Sets the required type of this Injectee.
|
String |
toString() |
public Type getRequiredType()
Injectee
getRequiredType
in interface Injectee
public void setRequiredType(Type requiredType)
requiredType
- The required type of this injectee.public Set<Annotation> getRequiredQualifiers()
Injectee
getRequiredQualifiers
in interface Injectee
null
, but may return an empty set. The set of all qualifiers that must match.public void setRequiredQualifiers(Set<Annotation> requiredQualifiers)
requiredQualifiers
- The non-null set of required qualifiers.public Class<? extends Annotation> getParentClassScope()
Injectee
getParentClassScope
in interface Injectee
public void setParentClassScope(Class<? extends Annotation> parentClassScope)
public boolean isFactory()
Injectee
true
if the injectee value is provided using Supplier
.public void setFactory(boolean factory)
factory
- true
flag whether the injectee is factory.public boolean isProvider()
Injectee
true
if the injectee value is provided using Provider
.isProvider
in interface Injectee
true
if the injectee is a provider.public void setProvider(boolean provider)
provider
- true
flag whether the injectee is provider.public int getPosition()
Injectee
Injectee
is a field, this will return -1
.getPosition
in interface Injectee
-1
if this is a field.public void setPosition(int position)
-1
if this Injectee is
describing a field.position
- The index position of the parameter, or -1
if describing a field.public Class<?> getInjecteeClass()
Injectee
null
if this is from a service lookup.getInjecteeClass
in interface Injectee
public void setInjecteeClass(Class<?> injecteeClass)
injecteeClass
- injectee type.public AnnotatedElement getParent()
Injectee
null
.public void setParent(AnnotatedElement parent)
parent
- The parent (Field, Constructor or Method) which is the parent of this Injectee.public boolean isOptional()
Injectee
true
if this injection point is annotated with VOptional. In this case if there is no
definition for the injection point in the system it is allowable for the system to merely return null
.isOptional
in interface Injectee
true
if the injection point is annotated with VOptional, false
otherwise.public void setOptional(boolean optional)
optional
- true if this injectee is optional, false if required.public ForeignDescriptor getInjecteeDescriptor()
Injectee
getInjecteeDescriptor
in interface Injectee
public void setInjecteeDescriptor(ForeignDescriptor injecteeDescriptor)
injecteeDescriptor
- injectee's descriptor.Copyright © 2007-2024, Oracle and/or its affiliates. All Rights Reserved. Use is subject to license terms.