Class TypeKey<T>
java.lang.Object
com.googlecode.objectify.impl.translate.TypeKey<T>
public class TypeKey<T> extends Object
Unique identifier for a translator instance. Important so we can re-use translators as we navigate the tree, allowing us to store recursive structures.
- Author:
- Jeff Schnitzer
-
Constructor Summary
-
Method Summary
Modifier and TypeMethodDescription<A extends Annotation>
AgetAnnotation(Class<A> annotationType)
Gets the annotation that has the specified type, or null if there isn't one<A extends Annotation>
AgetAnnotationAnywhere(Class<A> annotationType)
Checks not only the listed annotations but also annotations on the class.Get the basic class through erasure.boolean
isAnnotationPresent(Class<? extends Annotation> annotationType)
boolean
isAssignableTo(Class<?> superclass)
Can this type be assigned to a variable with the specified type?
-
Constructor Details
-
TypeKey
-
TypeKey
Create a new typekey for a new type but which preserves characteristics of the old typekey (ie annotations). This is used when creating a new typekey for component types. -
TypeKey
Create a typekey from a property
-
-
Method Details
-
getTypeAsClass
Get the basic class through erasure. -
getAnnotation
Gets the annotation that has the specified type, or null if there isn't one -
isAnnotationPresent
- Returns:
- true if the annotation is present
-
getAnnotationAnywhere
Checks not only the listed annotations but also annotations on the class. -
isAssignableTo
Can this type be assigned to a variable with the specified type?
-