public static final class Lookup.Template<T>
extends java.lang.Object
| Constructor | 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(java.lang.Class<T> type) |
Create a simple template matching by class.
|
Template(java.lang.Class<T> type,
java.lang.String id,
T instance) |
Constructor to create new template.
|
| Modifier and Type | Method | Description |
|---|---|---|
boolean |
equals(java.lang.Object obj) |
|
java.lang.String |
getId() |
Get the persistent identifier being searched for, if any.
|
T |
getInstance() |
Get the specific instance being searched for, if any.
|
java.lang.Class<T> |
getType() |
Get the class (or superclass or interface) to search for.
|
int |
hashCode() |
|
java.lang.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(java.lang.Class<T> type)
type - the class of service we are looking for (subclasses will match)public Template(java.lang.Class<T> type, java.lang.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 java.lang.Class<T> getType()
Object is used as
this will match any instance.public java.lang.String getId()
nullLookup.Item.getId()public T getInstance()
Item when the instance
is already known.nullpublic int hashCode()
hashCode in class java.lang.Objectpublic boolean equals(java.lang.Object obj)
equals in class java.lang.Objectpublic java.lang.String toString()
toString in class java.lang.ObjectBuilt on April 24 2018. | Portions Copyright 1997-2018 Oracle. All rights reserved.