Interface MetaDataMerged
MetaData
class whose
interfaces will be automatically merged into the sibling class that it's
augmenting.
So, consider a class Foo
and another class
FooMetaData
. When FooMetaData
implements
MetaDataMerged
, RIFE2 will adapt Foo
and make it
implement all the interfaces that FooMetaData
implements.
Also, when the default constructor of Foo
is called, an
instance of FooMetaData
will be created and stored in a new
hidden member variable. The added method implementations simple delegate to
the instance of FooMetaData
.
Optionally, FooMetaData
can also implement
MetaDataBeanAware
, in which case the instance of
FooMetaData
will receive the instance of Foo that it belongs
to right after it has been instantiated.
Note that the relationship between Foo
and
FooMetaData
is purely name based (the MetaData
suffix). RIFE2 will look up the metadata class through the classpath, which
means that it's possible to augment any class, anywhere, in any package,
even without having the source code.
- Since:
- 1.0
- See Also: