Home

EObject

EObject is the root interface for all modeled objects in the Eclipse Modeling Framework (EMF). It defines a minimal, uniform API that enables reflection, dynamic feature access, and integration with EMF’s containment and persistence mechanisms. Most EMF-generated model classes implement EObject either directly or via a generated base class, and instances are created by factory methods and may be contained within EMF Resources.

Key capabilities of EObject include its support for reflective access to an object's type and features. The

EObject inherits from Notifier, enabling a notification mechanism through adapters. Methods such as eAdapters and eNotify

Usage of EObject often appears in more dynamic or reflective code, where features are accessed without compile-time

In summary, EObject provides the core runtime interface for all EMF objects, supporting type introspection, feature

eClass
method
returns
the
meta-object
(an
EClass)
describing
the
object's
type.
Feature
access
is
provided
through
eGet,
eSet,
eIsSet,
and
eUnset,
which
allow
reading
and
modifying
features
by
their
feature
IDs
or
by
structural
features.
EObject
also
participates
in
the
containment
hierarchy
via
eContainer
and
can
reference
the
resource
it
belongs
to
through
eResource.
Directly
containing
elements
can
be
enumerated
with
eContents,
and
deeper
traversal
is
possible
with
eAllContents.
facilitate
listening
for
changes,
which
is
central
to
EMF’s
data
binding
and
editing
support.
knowledge
of
their
types.
It
also
underpins
interoperability
between
generated
models
and
dynamic
EMF
models,
where
models
are
described
or
manipulated
at
runtime
rather
than
generated
from
a
static
schema.
manipulation,
containment,
resource
association,
and
change
notification
within
the
EMF
ecosystem.