com.fasterxml.jackson.databind.introspect.AnnotatedField.java Source code

Java tutorial

Introduction

Here is the source code for com.fasterxml.jackson.databind.introspect.AnnotatedField.java

Source

package com.fasterxml.jackson.databind.introspect;

import java.io.Serializable;
import java.lang.annotation.Annotation;
import java.lang.reflect.Field;
import java.lang.reflect.Member;
import java.lang.reflect.Type;

public final class AnnotatedField extends AnnotatedMember implements Serializable {
    protected final transient Field _field;

    public AnnotatedField(Field paramField, AnnotationMap paramAnnotationMap) {
        super(paramAnnotationMap);
        this._field = paramField;
    }

    public Field getAnnotated() {
        return this._field;
    }

    public <A extends Annotation> A getAnnotation(Class<A> paramClass) {
        return this._annotations.get(paramClass);
    }

    public Class<?> getDeclaringClass() {
        return this._field.getDeclaringClass();
    }

    public String getFullName() {
        return getDeclaringClass().getName() + "#" + getName();
    }

    public Type getGenericType() {
        return this._field.getGenericType();
    }

    public Member getMember() {
        return this._field;
    }

    public String getName() {
        return this._field.getName();
    }

    public Class<?> getRawType() {
        return this._field.getType();
    }

    public Object getValue(Object paramObject) {
        try {
            Object localObject = this._field.get(paramObject);
            return localObject;
        } catch (IllegalAccessException localIllegalAccessException) {
            throw new IllegalArgumentException("Failed to getValue() for field " + getFullName() + ": "
                    + localIllegalAccessException.getMessage(), localIllegalAccessException);
        }
    }

    public void setValue(Object paramObject1, Object paramObject2) {
        try {
            this._field.set(paramObject1, paramObject2);
            return;
        } catch (IllegalAccessException localIllegalAccessException) {
            throw new IllegalArgumentException("Failed to setValue() for field " + getFullName() + ": "
                    + localIllegalAccessException.getMessage(), localIllegalAccessException);
        }
    }

    public String toString() {
        return "[field " + getFullName() + "]";
    }

    public AnnotatedField withAnnotations(AnnotationMap paramAnnotationMap) {
        return new AnnotatedField(this._field, paramAnnotationMap);
    }
}

/* Location:           /Users/dantheman/src/fffffffffattttt/basis/classes_dex2jar.jar
 * Qualified Name:     com.fasterxml.jackson.databind.introspect.AnnotatedField
 * JD-Core Version:    0.6.2
 */