public class Key<T> extends Object
Modifier and Type | Field and Description |
---|---|
protected String |
bindingName |
protected org.apache.cayenne.di.TypeLiteral<T> |
typeLiteral |
Modifier | Constructor and Description |
---|---|
protected |
Key(org.apache.cayenne.di.TypeLiteral<T> type,
String bindingName) |
Modifier and Type | Method and Description |
---|---|
boolean |
equals(Object object) |
static <T> Key<T> |
get(Class<T> type)
Creates a key for a nameless binding of a given type.
|
static <T> Key<T> |
get(Class<T> type,
String bindingName)
Creates a key for a named binding of a given type.
|
String |
getBindingName()
Returns an optional name of the binding used to distinguish multiple bindings of
the same object type.
|
static <T> Key<List<T>> |
getListOf(Class<T> type) |
static <T> Key<List<T>> |
getListOf(Class<T> type,
String bindingName) |
static <K,V> Key<Map<K,V>> |
getMapOf(Class<K> keyType,
Class<V> valueType) |
static <K,V> Key<Map<K,V>> |
getMapOf(Class<K> keyType,
Class<V> valueType,
String bindingName) |
Class<T> |
getType() |
int |
hashCode() |
String |
toString() |
protected org.apache.cayenne.di.TypeLiteral<T> typeLiteral
protected String bindingName
public static <T> Key<T> get(Class<T> type)
public static <T> Key<T> get(Class<T> type, String bindingName)
public static <K,V> Key<Map<K,V>> getMapOf(Class<K> keyType, Class<V> valueType)
public static <K,V> Key<Map<K,V>> getMapOf(Class<K> keyType, Class<V> valueType, String bindingName)
public String getBindingName()
Copyright © 2001–2023 Apache Cayenne. All rights reserved.