sealed abstract class JVMField extends ClassMember with Ordered[JVMField]
Represents a single field declaration/definition.
- Note
Fields, which are directly created, have no link to "their defining" ClassFile. This link is implicitly established when a method is added to a ClassFile. This operation also updates the field object.
,Identity (w.r.t.
equals/hashCode) is intentionally by reference (default behavior).
- Alphabetic
- By Inheritance
- JVMField
- Ordered
- Comparable
- ClassMember
- ConcreteSourceElement
- SourceElement
- CommonSourceElementAttributes
- CommonAttributes
- AnyRef
- Any
- Hide All
- Show All
- Public
- All
Abstract Value Members
-
abstract
def
accessFlags: Int
This field's access flags.
This field's access flags. To analyze the access flags bit vector use org.opalj.bi.AccessFlag or org.opalj.bi.AccessFlagsIterator or use pattern matching.
- Definition Classes
- JVMField → ConcreteSourceElement
-
abstract
def
attributes: Attributes
The defined attributes.
The defined attributes. The JVM 8 specification defines the following attributes for fields: * ConstantValue, * Synthetic, * Signature, * Deprecated, * RuntimeVisibleAnnotationTable, * RuntimeInvisibleAnnotationTable, * RuntimeVisibleTypeAnnotationTable and * RuntimeInvisibleTypeAnnotationTable.
- Definition Classes
- JVMField → CommonAttributes
-
abstract
def
fieldType: FieldType
The (erased) type of this field.
-
abstract
def
name: String
The name of this field.
The name of this field. The name is interned (see
String.intern()for details.) Note, that this name is not required to be a valid Java programming language identifier.- Definition Classes
- JVMField → ClassMember
Concrete Value Members
-
final
def
!=(arg0: Any): Boolean
- Definition Classes
- AnyRef → Any
-
final
def
##(): Int
- Definition Classes
- AnyRef → Any
-
def
<(that: JVMField): Boolean
- Definition Classes
- Ordered
-
def
<=(that: JVMField): Boolean
- Definition Classes
- Ordered
-
final
def
==(arg0: Any): Boolean
- Definition Classes
- AnyRef → Any
-
def
>(that: JVMField): Boolean
- Definition Classes
- Ordered
-
def
>=(that: JVMField): Boolean
- Definition Classes
- Ordered
-
def
annotations: Annotations
The list of all annotations.
The list of all annotations. In general, if a specific annotation is searched for the method runtimeVisibleAnnotations or runtimeInvisibleAnnotations should be used.
- Definition Classes
- CommonSourceElementAttributes
-
def
asClassFile: ClassFile
- Definition Classes
- SourceElement
-
def
asField: Field
- Definition Classes
- SourceElement
-
final
def
asInstanceOf[T0]: T0
- Definition Classes
- Any
-
def
asMethod: Method
- Definition Classes
- SourceElement
- def asVirtualField(declaringClassType: ObjectType): VirtualField
- final def asVirtualField(declaringClassFile: ClassFile): VirtualField
-
def
clone(): AnyRef
- Attributes
- protected[java.lang]
- Definition Classes
- AnyRef
- Annotations
- @native() @throws( ... )
-
def
compare(other: JVMField): Int
Defines an absolute order on
Fieldobjects w.r.t.Defines an absolute order on
Fieldobjects w.r.t. their names and types. The order is defined by first lexicographically comparing the names of the fields and – if the names are identical – by comparing the types.- Definition Classes
- JVMField → Ordered
-
def
compareAttributes(other: Attributes, config: SimilarityTestConfiguration): Option[AnyRef]
Compares this element's attributes with the given one.
Compares this element's attributes with the given one.
- returns
None, if both attribute lists are similar; Some(<description of the difference>) otherwise.
- Attributes
- protected[this]
- Definition Classes
- CommonAttributes
-
def
compareTo(that: JVMField): Int
- Definition Classes
- Ordered → Comparable
-
def
constantFieldValue: Option[ConstantFieldValue[_]]
Returns this field's constant value.
- def copy(accessFlags: Int = this.accessFlags, name: String = this.name, fieldType: FieldType = this.fieldType, attributes: Attributes = this.attributes): FieldTemplate
-
final
def
eq(arg0: AnyRef): Boolean
- Definition Classes
- AnyRef
-
def
equals(arg0: Any): Boolean
- Definition Classes
- AnyRef → Any
-
def
fieldTypeSignature: Option[FieldTypeSignature]
Returns this field's type signature.
-
def
finalize(): Unit
- Attributes
- protected[java.lang]
- Definition Classes
- AnyRef
- Annotations
- @throws( classOf[java.lang.Throwable] )
-
final
def
foreachTypeAnnotation[U](f: (TypeAnnotation) ⇒ U): Unit
- Definition Classes
- CommonAttributes
-
final
def
getClass(): Class[_]
- Definition Classes
- AnyRef → Any
- Annotations
- @native()
-
final
def
hasDefaultVisibility: Boolean
- Definition Classes
- ClassMember
-
def
hasFlags(accessFlags: Int): Boolean
- Definition Classes
- ConcreteSourceElement
-
def
hashCode(): Int
- Definition Classes
- AnyRef → Any
- Annotations
- @native()
-
def
isClass: Boolean
- Definition Classes
- SourceElement
-
def
isDeprecated: Boolean
Returns true if this (field, method, class) declaration is declared as deprecated.
Returns true if this (field, method, class) declaration is declared as deprecated.
Note
The deprecated attribute is always set by the Java compiler when either the deprecated annotation or the JavaDoc tag is used.
- Definition Classes
- CommonSourceElementAttributes
-
def
isField: Boolean
- Definition Classes
- SourceElement
-
final
def
isFinal: Boolean
- Definition Classes
- ClassMember
-
final
def
isInstanceOf[T0]: Boolean
- Definition Classes
- Any
-
def
isMethod: Boolean
- Definition Classes
- SourceElement
-
final
def
isNotFinal: Boolean
- Definition Classes
- ClassMember
-
final
def
isNotStatic: Boolean
- Definition Classes
- ClassMember
-
final
def
isPackagePrivate: Boolean
- Definition Classes
- ClassMember
-
final
def
isPrivate: Boolean
- Definition Classes
- ClassMember
-
final
def
isProtected: Boolean
- Definition Classes
- ClassMember
-
final
def
isPublic: Boolean
- Definition Classes
- ClassMember
-
final
def
isStatic: Boolean
- Definition Classes
- ClassMember
-
final
def
isSynthetic: Boolean
Trueif theSyntheticaccess flag or attribute is used.Trueif theSyntheticaccess flag or attribute is used.- Definition Classes
- ClassMember → CommonSourceElementAttributes
- def isTransient: Boolean
-
def
isVirtual: Boolean
- Definition Classes
- SourceElement
- def isVolatile: Boolean
-
final
def
ne(arg0: AnyRef): Boolean
- Definition Classes
- AnyRef
-
final
def
notify(): Unit
- Definition Classes
- AnyRef
- Annotations
- @native()
-
final
def
notifyAll(): Unit
- Definition Classes
- AnyRef
- Annotations
- @native()
-
def
runtimeInvisibleAnnotations: Annotations
- Definition Classes
- CommonSourceElementAttributes
-
def
runtimeInvisibleTypeAnnotations: TypeAnnotations
- Definition Classes
- CommonAttributes
-
def
runtimeVisibleAnnotations: Annotations
- Definition Classes
- CommonSourceElementAttributes
-
def
runtimeVisibleTypeAnnotations: TypeAnnotations
- Definition Classes
- CommonAttributes
- def signatureToJava(withAccessFlags: Boolean = false): String
-
def
similar(other: JVMField, config: SimilarityTestConfiguration): Boolean
Compares this field with the given one for structural equality.
Compares this field with the given one for structural equality.
Two fields are structurally equal if they have the same names, flags, type and attributes. In the latter case, the order doesn't matter!
-
final
def
synchronized[T0](arg0: ⇒ T0): T0
- Definition Classes
- AnyRef
-
def
toString(): String
- Definition Classes
- JVMField → AnyRef → Any
-
def
visibilityModifier: Option[VisibilityModifier]
- Definition Classes
- ConcreteSourceElement
-
final
def
wait(): Unit
- Definition Classes
- AnyRef
- Annotations
- @throws( ... )
-
final
def
wait(arg0: Long, arg1: Int): Unit
- Definition Classes
- AnyRef
- Annotations
- @throws( ... )
-
final
def
wait(arg0: Long): Unit
- Definition Classes
- AnyRef
- Annotations
- @native() @throws( ... )