class DexFile; template<typename T> class LengthPrefixedArray; class ScopedObjectAccessAlreadyRunnable;
namespace mirror { classClass; class ClassLoader; class DexCache; class Object; class String;
} // namespace mirror
class EXPORT ArtField final { public: // Visit declaring classes of all the art-fields in 'array' that reside // in [start_boundary, end_boundary). template<typename RootVisitorType> staticvoid VisitArrayRoots(RootVisitorType& visitor,
uint8_t* start_boundary,
uint8_t* end_boundary,
LengthPrefixedArray<ArtField>* array)
REQUIRES_SHARED(Locks::mutator_lock_);
// NO_THREAD_SAFETY_ANALYSIS since we don't know what the callback requires. template<typename RootVisitorType>
ALWAYS_INLINE inlinevoid VisitRoots(RootVisitorType& visitor) NO_THREAD_SAFETY_ANALYSIS {
visitor.VisitRoot(declaring_class_.AddressWithoutBarrier());
}
// Returns an instance field with this offset in the given class or null if not found. // If kExactOffset is true then we only find the matching offset, not the field containing the // offset. template <bool kExactOffset = true,
VerifyObjectFlags kVerifyFlags = kDefaultVerifyFlags,
ReadBarrierOption kReadBarrierOption = kWithReadBarrier> static ArtField* FindInstanceFieldWithOffset(ObjPtr<mirror::Class> klass, uint32_t field_offset)
REQUIRES_SHARED(Locks::mutator_lock_);
// Returns a static field with this offset in the given class or null if not found. // If kExactOffset is true then we only find the matching offset, not the field containing the // offset. template <bool kExactOffset = true> static ArtField* FindStaticFieldWithOffset(ObjPtr<mirror::Class> klass, uint32_t field_offset)
REQUIRES_SHARED(Locks::mutator_lock_);
// Returns a human-readable signature. Something like "a.b.C.f" or // "int a.b.C.f" (depending on the value of 'with_type'). static std::string PrettyField(ArtField* f, bool with_type = true)
REQUIRES_SHARED(Locks::mutator_lock_);
std::string PrettyField(bool with_type = true)
REQUIRES_SHARED(Locks::mutator_lock_);
// Returns true if a set-* instruction in the given method is allowable.
ALWAYS_INLINE inlinebool CanBeChangedBy(ArtMethod* method) REQUIRES_SHARED(Locks::mutator_lock_);
// Returns true if this field's value can change only once. // Any kAccMonotonic access flag set field is unmodifiable, but the opposite might not be true: // `static final` are unmodifiable for apps targeting Android C only. // // Note: In some cases, this function needs to check the field type. Callers use the // `get_field_type` argument to specify how to retrieve it, whether it's by using // `ArtField::LookupResolvedType()` for a previously resolved field type, or by // `Field::GetType()` when a corresponding reflection `Field` object is available. // We currently do not support `ArtField::ResolveType()` as we do not handle failures. bool IsUnmodifiable(auto&& get_field_type) REQUIRES_SHARED(Locks::mutator_lock_);
Die Informationen auf dieser Webseite wurden
nach bestem Wissen sorgfältig zusammengestellt. Es wird jedoch weder Vollständigkeit, noch Richtigkeit,
noch Qualität der bereit gestellten Informationen zugesichert.
Bemerkung:
Die farbliche Syntaxdarstellung und die Messung sind noch experimentell.