class

Slot

const abstract class Slot : Obj

Slot represents a member field or method on a Type.

methods hasFacet

Return if this type has the specified facet defined

parent

Parent type which defines this slot

isStatic

Return if slot is static (class based, rather than instance)

signature

Return a string representation of the Fantom code signature

isField

Return true if this is an instance of Field

isSynthetic

Return if this slot was generated by the compiler

isPrivate

Return if slot has private protection scope

isNative

Return if slot is native

facets

Get the list of facets defined on this slot or return an empty list if no facets are defined

isProtected

Return if slot has protected protection scope

findMethod

Convenience for (Method)find(qname, checked)

find

Find a Slot by its qualified name "pod::Type.slot"

isConst

Return if slot is constant and thread safe

qname

Qualified name such as "sys:Str.size"

isOverride

Return if slot is an override (of parent's virtual method)

isMethod

Return true if this is an instance of Method

isPublic

Return if slot has public protection scope

toStr

Always return qname()

findFunc

Convenience for findMethod(qname, checked).func

isAbstract

Return if slot is abstract (no implementation provided)

isInternal

Return if slot has internal protection scope

name

Simple name of the slot such as "size"

doc

Return the raw fandoc for this slot or null if not available

isVirtual

Return if slot is virtual (may be overridden in subclasses)

findField

Convenience for (Field)find(qname, checked)

facet

Get a facet by its type

isCtor

Return if slot is constructor method

doc Str? doc()

Return the raw fandoc for this slot or null if not available.

facet Facet? facet(Type type, Bool checked)

Get a facet by its type. If not found on this slot then return null or throw UnknownFacetErr based on check flag. See Facets Doc for details.

facets Facet[] facets()

Get the list of facets defined on this slot or return an empty list if no facets are defined. If looking up a facet by type, then use the facet method which will provide better performance. See Facets Doc for details.

find static Slot? find(Str qname, Bool checked)

Find a Slot by its qualified name "pod::Type.slot". If the slot doesn't exist and checked is false then return null, otherwise throw UnknownSlotErr.

findField static Field? findField(Str qname, Bool checked)

Convenience for (Field)find(qname, checked)

findFunc static Func? findFunc(Str qname, Bool checked)

Convenience for findMethod(qname, checked).func

findMethod static Method? findMethod(Str qname, Bool checked)

Convenience for (Method)find(qname, checked)

hasFacet Bool hasFacet(Type type)

Return if this type has the specified facet defined.

isAbstract Bool isAbstract()

Return if slot is abstract (no implementation provided).

isConst Bool isConst()

Return if slot is constant and thread safe. A constant field is explicitly marked with the const modifier and guaranteed to always reference the same immutable object for the life of the VM. A const method is guaranteed to not capture any state from its thread, and is safe to execute on other threads. The compiler marks methods as const based on the following analysis:

  • static methods are always automatically const
  • instance methods are never const
  • closures which don't capture any variables from their scope are automatically const
  • partial apply methods which only capture const variables from their scope are automatically const

isCtor Bool isCtor()

Return if slot is constructor method.

isField Bool isField()

Return true if this is an instance of Field.

isInternal Bool isInternal()

Return if slot has internal protection scope.

isMethod Bool isMethod()

Return true if this is an instance of Method.

isNative Bool isNative()

Return if slot is native.

isOverride Bool isOverride()

Return if slot is an override (of parent's virtual method).

isPrivate Bool isPrivate()

Return if slot has private protection scope.

isProtected Bool isProtected()

Return if slot has protected protection scope.

isPublic Bool isPublic()

Return if slot has public protection scope.

isStatic Bool isStatic()

Return if slot is static (class based, rather than instance).

isSynthetic Bool isSynthetic()

Return if this slot was generated by the compiler.

isVirtual Bool isVirtual()

Return if slot is virtual (may be overridden in subclasses).

name Str name()

Simple name of the slot such as "size".

parent Type parent()

Parent type which defines this slot.

qname Str qname()

Qualified name such as "sys:Str.size".

signature virtual Str signature()

Return a string representation of the Fantom code signature.

toStr virtual Str toStr()

Always return qname().

Haxall 4.0.5 ∙ 24-Feb-2026 14:33 EST