FieldAttributes.java 1.27 KB
package com.google.gson;

import com.google.gson.internal..Gson.Preconditions;
import java.lang.annotation.Annotation;
import java.lang.reflect.Field;
import java.lang.reflect.Type;
import java.util.Arrays;
import java.util.Collection;

public final class FieldAttributes
{
  private final Field a;
  
  public FieldAttributes(Field paramField)
  {
    .Gson.Preconditions.checkNotNull(paramField);
    this.a = paramField;
  }
  
  public final <T extends Annotation> T getAnnotation(Class<T> paramClass)
  {
    return this.a.getAnnotation(paramClass);
  }
  
  public final Collection<Annotation> getAnnotations()
  {
    return Arrays.asList(this.a.getAnnotations());
  }
  
  public final Class<?> getDeclaredClass()
  {
    return this.a.getType();
  }
  
  public final Type getDeclaredType()
  {
    return this.a.getGenericType();
  }
  
  public final Class<?> getDeclaringClass()
  {
    return this.a.getDeclaringClass();
  }
  
  public final String getName()
  {
    return this.a.getName();
  }
  
  public final boolean hasModifier(int paramInt)
  {
    return (this.a.getModifiers() & paramInt) != 0;
  }
}


/* Location:              /home/merong/decompile/hackery-dex2jar.jar!/com/google/gson/FieldAttributes.class
 * Java compiler version: 6 (50.0)
 * JD-Core Version:       0.7.1
 */