Constructor and Description |
---|
Template()
Deprecated.
Use
new Template (Object.class) which
is going to be better typed with JDK1.5 templates and should produce
the same result. |
Template(Class<T> type)
Create a simple template matching by class.
|
Template(Class<T> type,
String id,
T instance)
Constructor to create new template.
|
Modifier and Type | Method and Description |
---|---|
boolean |
equals(Object obj) |
String |
getId()
Get the persistent identifier being searched for, if any.
|
T |
getInstance()
Get the specific instance being searched for, if any.
|
Class<T> |
getType()
Get the class (or superclass or interface) to search for.
|
int |
hashCode() |
String |
toString() |
@Deprecated public Template()
new Template (Object.class)
which
is going to be better typed with JDK1.5 templates and should produce
the same result.public Template(Class<T> type)
type
- the class of service we are looking for (subclasses will match)public Template(Class<T> type, String id, T instance)
type
- the class of service we are looking for or null
to leave unspecifiedid
- the ID of the item/service we are looking for or null
to leave unspecifiedinstance
- a specific known instance to look for or null
to leave unspecifiedpublic Class<T> getType()
Object
is used as
this will match any instance.public String getId()
null
Lookup.Item.getId()
public T getInstance()
Item
when the instance
is already known.null