NAME

Tangence::Compiler::Class - structure representing one Tangence class

DESCRIPTION

This data structure object stores information about one Tangence class, as parsed by Tangence::Compiler::Parser. Once constructed, such objects are immutable.

CONSTRUCTOR

$class = Tangence::Compiler::Class->new( %args )

Returns a new instance initialised by the given arguments.

name => STRING

Name of the class

methods => HASH
events => HASH
properties => HASH

Optional HASH references containing metadata about methods, events and properties, as instances of Tangence::Compiler::Method, Tangence::Compiler::Event or Tangence::Compiler::Property.

superclasses => ARRAY

Optional ARRAY reference containing superclasses as Tangence::Compiler::Class references.

ACCESSORS

$name = $class->name

Returns the name of the class

@superclasses = $class->direct_superclasses

Return the direct superclasses in a list of Tangence::Compiler::Class references.

$methods = $class->direct_methods

Return the methods that this class directly defines (rather than inheriting from superclasses) as a HASH reference mapping names to Tangence::Compiler::Method instances.

$events = $class->direct_events

Return the events that this class directly defines (rather than inheriting from superclasses) as a HASH reference mapping names to Tangence::Compiler::Event instances.

$properties = $class->direct_properties

Return the properties that this class directly defines (rather than inheriting from superclasses) as a HASH reference mapping names to Tangence::Compiler::Property instances.

AGGREGATE ACCESSORS

The following accessors inspect the full inheritance tree of this class and all its superclasses

@superclasses = $class->superclasses

Return all the superclasses in a list of unique Tangence::Compiler::Class references.

$methods = $class->methods

Return all the methods available to this class as a HASH reference mapping names to Tangence::Compiler::Method instances.

$events = $class->events

Return all the events available to this class as a HASH reference mapping names to Tangence::Compiler::Event instances.

$properties = $class->properties

Return all the properties available to this class as a HASH reference mapping names to Tangence::Compiler::Property instances.

AUTHOR

Paul Evans <leonerd@leonerd.org.uk>