NAME

UMMF::UML::MetaModel::Factory - Defines a factory for (meta-)model construction.

SYNOPSIS

use UMMF::UML::MetaMetaModel::Factory;
$factory = UMMF::UML::MetaMetaModel::Factory->new('classMap' => ...,
                                           );
$factory->create(...);
$factory->createInstance(...);

DESCRIPTION

USAGE

EXPORT

None exported.

AUTHOR

Kurt Stephens, kstephens@users.sourceforge.net 2003/04/06

SEE ALSO

UMMF::UML::MetaModel

VERSION

$Revision: 1.12 $

METHODS

classMap

my $map = $self->classMap;

Returns a hash that maps names to Perl package names.

If $self->{'classMap'} is a SCALAR, $self->{'classMap'} = $self->{'classMap'}->factory_map is performed, loading the class map from a package's factory_map method..

If $self->{'classMap'} is an ARRAY, the ARRAY is transformed into a hash. In this case, colliding $names will have concatenated package names that should cause $self->class($name) to fail.

class

my $pkg = $self->class($name, @args);

Returns the Perl package for the Classifier named $name.

The Perl package is dynamically loaded, if necessary.

Called by create and create_instance.

create_instance

my $obj = $self->create_instance($name, @args);

Creates a new instance of the class named $name, via $pkg->__new_instance(@args).

This creates a new uninitialized object.

create

my $obj = $self->create($name, @args);

Creates a new initialized instance of the class named $name, via $pkg->new(@args).

flush

$self->flush($kind);

Called by UMMF::UML::MetaMetaModel::Builder for each $kind of object created during Model construction.

Subclasses may override this method.