reflect.Package
An isolated runtime-compiled package.
Signature
class reflect.PackageAn isolated runtime-compiled package.
Source:<builtin>/reflect/reflect.bamlbytes 7767–11648
Fields
_inner
unknownStatic methods
_compile
(_finish
(compile
(Compiles files into an isolated package, resolving its dependencies
against packages.
Parameters
files: source text keyed by path, as the package'sbaml_src.packages: packages the source may depend on, keyed by the alias it imports them under.
Throws
reflect.errors.CompilationErrorif the source does not compile.- anything the package's top-level initialization throws, which is why
the clause is
unknown.
current
() -> reflect.PackageThe package lexically enclosing this call site.
Instance methods
Exported free-function signatures, keyed by package-local name.
Extract an exported function through an ordinary function-type contract.
A lookup by name has nowhere to put type arguments, so an unspecialized generic function is refused here.
tests
(self) -> map<string, () -> null throws unknown> throws unknownwith_types
(Implementations
reflect.AnyClass for T
Instance methods
The class declaration's schema metadata, or empty metadata when the runtime type is not a class.
Read a field as T. A missing field returns null; use has_field to
distinguish that case from a present field whose value is null.
Return a value-bound field handle, or null when no such field exists.
has_field
(self, name: string) -> boolWhether this value's runtime class declares a field called name.
false when the runtime type is not a class.
Reflected fields bound to this value for Field.value<T>().
name
(self) -> stringThe rendered name of this value's concrete runtime type.
This value's concrete runtime type.
Source:<builtin>/reflect/reflect.bamlbytes 6092–6122
Related definitions
reflect.AnyClassreflect.AnyClassreflect.AnyClassreflect.AnyClassreflect.AnyClassreflect.AnyClassreflect.AnyClassreflect.AnyClassreflect.class.Fieldreflect.class.Typereflect.CompileArtifactreflect.Diagnosticreflect.enum.Typereflect.errors.CompilationErrorreflect.errors.TypeMismatchreflect.function.Typereflect.interface.Typereflect.Metareflect.Typereflect.TypeView