Package org.jclouds.json.internal
Class NamingStrategies.NameExtractor<A extends Annotation>
- java.lang.Object
-
- org.jclouds.json.internal.NamingStrategies.NameExtractor<A>
-
- All Implemented Interfaces:
com.google.common.base.Function<Annotation,String>
,com.google.common.base.Supplier<com.google.common.base.Predicate<Annotation>>
,Function<Annotation,String>
,Supplier<com.google.common.base.Predicate<Annotation>>
- Direct Known Subclasses:
NamingStrategies.ExtractNamed
,NamingStrategies.ExtractSerializedName
- Enclosing class:
- NamingStrategies
public abstract static class NamingStrategies.NameExtractor<A extends Annotation> extends Object implements com.google.common.base.Function<Annotation,String>, com.google.common.base.Supplier<com.google.common.base.Predicate<Annotation>>
Specifies how to extract the name from an annotation for use in determining the serialized name.- See Also:
SerializedName
,NamingStrategies.ExtractSerializedName
-
-
Field Summary
Fields Modifier and Type Field Description protected Class<A>
annotationType
protected com.google.common.base.Predicate<Annotation>
predicate
-
Constructor Summary
Constructors Modifier Constructor Description protected
NameExtractor(Class<A> annotationType)
-
Method Summary
All Methods Instance Methods Abstract Methods Concrete Methods Modifier and Type Method Description Class<Annotation>
annotationType()
String
apply(Annotation in)
boolean
equals(Object obj)
protected abstract String
extractName(A cast)
com.google.common.base.Predicate<Annotation>
get()
int
hashCode()
String
toString()
-
-
-
Field Detail
-
annotationType
protected final Class<A extends Annotation> annotationType
-
predicate
protected final com.google.common.base.Predicate<Annotation> predicate
-
-
Method Detail
-
annotationType
public Class<Annotation> annotationType()
-
apply
public String apply(Annotation in)
- Specified by:
apply
in interfacecom.google.common.base.Function<Annotation,String>
- Specified by:
apply
in interfaceFunction<Annotation,String>
-
get
public com.google.common.base.Predicate<Annotation> get()
- Specified by:
get
in interfacecom.google.common.base.Supplier<A extends Annotation>
- Specified by:
get
in interfaceSupplier<A extends Annotation>
-
equals
public boolean equals(Object obj)
- Specified by:
equals
in interfacecom.google.common.base.Function<Annotation,String>
- Overrides:
equals
in classObject
-
-