![JAR search and dependency download from the Maven repository](/logo.png)
org.codehaus.jackson.map.introspect.AnnotatedParameter Maven / Gradle / Ivy
Go to download
Data Mapper package is a high-performance data binding package
built on Jackson JSON processor
package org.codehaus.jackson.map.introspect;
import java.lang.annotation.Annotation;
import java.lang.reflect.AnnotatedElement;
import java.lang.reflect.Type;
/**
* Object that represents method parameters, mostly so that associated
* annotations can be processed conveniently.
*/
public final class AnnotatedParameter
extends Annotated
{
final Type _type;
final AnnotationMap _annotations;
/*
/**********************************************************
/* Life-cycle
/**********************************************************
*/
public AnnotatedParameter(Type type, AnnotationMap ann)
{
_type = type;
_annotations = ann;
}
public void addOrOverride(Annotation a)
{
_annotations.add(a);
}
/*
/**********************************************************
/* Annotated impl
/**********************************************************
*/
/// Unfortunately, there is no matching JDK type...
@Override
public AnnotatedElement getAnnotated() { return null; }
/// Unfortunately, there is no matching JDK type...
@Override
public int getModifiers() { return 0; }
@Override
public String getName() { return ""; }
@Override
public A getAnnotation(Class acls)
{
return _annotations.get(acls);
}
@Override
public Type getGenericType() {
/* Hmmh. Could figure out real type (require it to be passed).
* But for now, let's assume we don't really need this method.
*/
return getRawType();
}
@Override
public Class> getRawType() {
// should never be called
throw new IllegalStateException();
}
/*
/**********************************************************
/* Extended API
/**********************************************************
*/
public Type getParameterType() { return _type; }
}
© 2015 - 2025 Weber Informatics LLC | Privacy Policy