NAME

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

DESCRIPTION

This data structure object stores information about one Tangence class. Once constructed and defined, such objects are immutable.

CONSTRUCTOR

$class = Tangence::Meta::Class->new( name => $name )

Returns a new instance representing the given name.

$class->define( %args )

Provides a definition for the class.

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

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

superclasses => ARRAY

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

ACCESSORS

$defined = $class->defined

Returns true if a definintion for the class has been provided using define.

$name = $class->name

Returns the name of the class

$perlname = $class->perlname

Returns the perl name of the class. This will be the Tangence name, with dots replaced by double colons (::).

@superclasses = $class->direct_superclasses

Return the direct superclasses in a list of Tangence::Meta::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::Meta::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::Meta::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::Meta::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::Meta::Class references.

$methods = $class->methods

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

$method = $class->method( $name )

Return the named method as a Tangence::Meta::Method instance, or undef if no such method exists.

$events = $class->events

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

$event = $class->event( $name )

Return the named event as a Tangence::Meta::Event instance, or undef if no such event exists.

$properties = $class->properties

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

$property = $class->property( $name )

Return the named property as a Tangence::Meta::Property instance, or undef if no such property exists.

AUTHOR

Paul Evans <leonerd@leonerd.org.uk>