Class ClassEntry

This is a foreign class that wraps over a Lily class.

public define doc: String

Return the docblock of this class, or an empty string. Docblocks are only saved when a class is parsed in manifest mode.

public define generics: List[TypeEntry]

Return the generic types available to this class. Classes defined outside of manifest mode will always return [].

public define id: Integer

Return the internal id of this class.

public define is_foreign: Boolean

This is the opposite of ClassEntry.is_native.

public define is_native: Boolean

Returns 'true' if this class has properties and/or can be inherited. Most native classes are found within native Lily modules. However, foreign libraries are able to create native classes (ex: Exception).

public define methods: List[MethodEntry]

Return the methods that were declared in this class. There is no guarantee as to the order. The constructor's name is <new> to prevent it from being named.

public define name: String

Return the name of the class provided.

public define parent: Option[ClassEntry]

If this class inherits from another, this returns that class in a 'Some'. Otherwise, this returns 'None'.

public define properties: List[PropertyEntry]

Return the properties that were declared on the class provided. If a class has been loaded, the properties inside are always loaded. This is in contrast to methods which may not be loaded.

public define property_count: Integer

Return the total number of properties in this class.

The total includes properties declared in this class as well as properties declared in all parent classes.