com.fasterxml.jackson.databind.introspect.Annotated Maven / Gradle / Ivy
Go to download
Show more of this group Show more artifacts with this name
Show all versions of redisson-all Show documentation
Show all versions of redisson-all Show documentation
Easy Redis Java client and Real-Time Data Platform. Valkey compatible. Sync/Async/RxJava3/Reactive API. Client side caching. Over 50 Redis based Java objects and services: JCache API, Apache Tomcat, Hibernate, Spring, Set, Multimap, SortedSet, Map, List, Queue, Deque, Semaphore, Lock, AtomicLong, Map Reduce, Bloom filter, Scheduler, RPC
The newest version!
package com.fasterxml.jackson.databind.introspect;
import java.lang.annotation.Annotation;
import java.lang.reflect.AnnotatedElement;
import java.lang.reflect.Modifier;
import com.fasterxml.jackson.databind.JavaType;
/**
* Shared base class used for anything on which annotations (included
* within a {@link AnnotationMap}).
*/
public abstract class Annotated
{
protected Annotated() { }
public abstract A getAnnotation(Class acls);
public abstract boolean hasAnnotation(Class> acls);
/**
* @since 2.7
*/
public abstract boolean hasOneOf(Class extends Annotation>[] annoClasses);
/**
* Method that can be used to find actual JDK element that this instance
* represents. It is non-null, except for method/constructor parameters
* which do not have a JDK counterpart.
*/
public abstract AnnotatedElement getAnnotated();
protected abstract int getModifiers();
public boolean isPublic() {
return Modifier.isPublic(getModifiers());
}
/**
* @since 2.16.2
*/
public boolean isStatic() {
return Modifier.isStatic(getModifiers());
}
public abstract String getName();
/**
* Full generic type of the annotated element; definition
* of what exactly this means depends on sub-class.
*
* @since 2.7
*/
public abstract JavaType getType();
/**
* "Raw" type (type-erased class) of the annotated element; definition
* of what exactly this means depends on sub-class.
*/
public abstract Class> getRawType();
/**
* Accessor that can be used to iterate over all the annotations
* associated with annotated component.
*
* @since 2.3
* @deprecated Since 2.9 should instead use {@link #getAnnotated()}
*/
@Deprecated
public abstract Iterable annotations();
// Also: ensure we can use #equals, #hashCode
@Override
public abstract boolean equals(Object o);
@Override
public abstract int hashCode();
@Override
public abstract String toString();
}
© 2015 - 2024 Weber Informatics LLC | Privacy Policy