public class DefaultComponentProvider extends ComponentProvider
Constructor and Description |
---|
DefaultComponentProvider() |
Modifier and Type | Method and Description |
---|---|
<T> java.lang.Object |
create(java.lang.Class<T> toLoad)
Create new instance.
|
boolean |
destroy(java.lang.Object o)
Destroys the given managed instance.
|
java.lang.reflect.Method |
getInvocableMethod(java.lang.reflect.Method method)
Get the method which should be invoked instead provided one.
|
boolean |
isApplicable(java.lang.Class<?> c)
Checks whether this component provider is able to provide an instance of given
Class . |
public boolean isApplicable(java.lang.Class<?> c)
ComponentProvider
Class
.isApplicable
in class ComponentProvider
c
- Class
to be checked.true
iff this ComponentProvider
is able to create an instance of the given Class
.public <T> java.lang.Object create(java.lang.Class<T> toLoad)
ComponentProvider
create
in class ComponentProvider
T
- type of the created object.toLoad
- Class
to be created.null
otherwise.public boolean destroy(java.lang.Object o)
ComponentProvider
destroy
in class ComponentProvider
o
- instance to be destroyed.true
iff the instance was coupled to this ComponentProvider
, false otherwise.public java.lang.reflect.Method getInvocableMethod(java.lang.reflect.Method method)
ComponentProvider
Useful mainly for EJB container support, where methods from endpoint class cannot be invoked directly - Tyrus needs to use method declared on remote interface.
Default implementation returns method provided as parameter.
getInvocableMethod
in class ComponentProvider
method
- method from endpoint class.Copyright © 2012–2020 Oracle Corporation. All rights reserved.