# ProtectionDomain class abstract interface

The protection domain used for type conversion.

This protection domain is used to validate types before conversion.

## Properties

hashCode → int
  The hash code for this object.
  no setter inherited
name → String
  The protection domain used for type conversion.
  no setter
parent → ProtectionDomain?
  The protection domain used for type conversion.
  no setter
permissions → Set<DomainPermission>
  The protection domain used for type conversion.
  no setter
properties → Map<String, dynamic>
  The protection domain used for type conversion.
  no setter
runtimeType → Type
  A representation of the runtime type of the object.
  no setter inherited

## Methods

checkAccess(String operation, [DomainPermission? permission]) → void
  Performs an access check for a specific `operation`, optionally guarded by a required `permission`. Throws if the access is not allowed.
getProperty<T>(String key) → T?
  Retrieves a typed property `T` stored in this domain under the given `key`.
hasAllPermissions(Set<DomainPermission> requiredPermissions) → bool
  Returns `true` if this domain includes all of the `requiredPermissions`.
hasPermission(DomainPermission permission) → bool
  Returns `true` if this domain grants the specified `permission`.
noSuchMethod(Invocation invocation) → dynamic
  Invoked when a nonexistent method or property is accessed.
  inherited
runWithDomain<T>(T fn()) → T
  Executes a function `fn` within the scope of this protection domain.
setProperty(String key, dynamic value) → void
  Stores a property under the given `key` with a `value`.
toString() → String
  A string representation of this object.
  inherited

## Operators

operator ==(Object other) → bool
  The equality operator.
  inherited

## Static Methods

create(String name, {Set<DomainPermission>? permissions, Map<String, dynamic>? properties, ProtectionDomain? parent}) → ProtectionDomain
  Creates a new custom ProtectionDomain with the specified `name`, optional `permissions`, `properties`, and an optional `parent`.
current() → ProtectionDomain
  Returns the domain currently bound to the executing thread or context.
setCurrent(ProtectionDomain domain) → void
  Sets the current executing domain to `domain`.
system() → ProtectionDomain
  Returns the root system domain, usually used by the framework itself.