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

new

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

Returns a new instance representing the given name.

define

   $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

   $defined = $class->defined

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

name

   $name = $class->name

Returns the name of the class

perlname

   $perlname = $class->perlname

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

direct_superclasses

   @superclasses = $class->direct_superclasses

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

direct_methods

   $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.

direct_events

   $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.

direct_properties

   $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

   @superclasses = $class->superclasses

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

methods

   $methods = $class->methods

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

method

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

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

events

   $events = $class->events

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

event

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

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

properties

   $properties = $class->properties

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

property

   $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>