com.android.dx.dex.file
Class FieldAnnotationStruct

java.lang.Object
  extended by com.android.dx.dex.file.FieldAnnotationStruct
All Implemented Interfaces:
ToHuman, Comparable<FieldAnnotationStruct>

public final class FieldAnnotationStruct
extends Object
implements ToHuman, Comparable<FieldAnnotationStruct>

Association of a field and its annotations.


Constructor Summary
FieldAnnotationStruct(CstFieldRef field, AnnotationSetItem annotations)
          Constructs an instance.
 
Method Summary
 void addContents(DexFile file)
          
 int compareTo(FieldAnnotationStruct other)
          
 boolean equals(Object other)
          
 Annotations getAnnotations()
          Gets the associated annotations.
 CstFieldRef getField()
          Gets the field this item is for.
 int hashCode()
          
 String toHuman()
          Return the "human" string form of this instance.
 void writeTo(DexFile file, AnnotatedOutput out)
          
 
Methods inherited from class java.lang.Object
clone, finalize, getClass, notify, notifyAll, toString, wait, wait, wait
 

Constructor Detail

FieldAnnotationStruct

public FieldAnnotationStruct(CstFieldRef field,
                             AnnotationSetItem annotations)
Constructs an instance.

Parameters:
field - non-null; the field in question
annotations - non-null; the associated annotations
Method Detail

hashCode

public int hashCode()

Overrides:
hashCode in class Object

equals

public boolean equals(Object other)

Overrides:
equals in class Object

compareTo

public int compareTo(FieldAnnotationStruct other)

Specified by:
compareTo in interface Comparable<FieldAnnotationStruct>

addContents

public void addContents(DexFile file)


writeTo

public void writeTo(DexFile file,
                    AnnotatedOutput out)


toHuman

public String toHuman()
Return the "human" string form of this instance. This is generally less "debuggy" than toString().

Specified by:
toHuman in interface ToHuman
Returns:
non-null; the human string form

getField

public CstFieldRef getField()
Gets the field this item is for.

Returns:
non-null; the field

getAnnotations

public Annotations getAnnotations()
Gets the associated annotations.

Returns:
non-null; the annotations


Copyright © 2015. All rights reserved.