<s>
The	O
marker	B-Language
interface	I-Language
pattern	I-Language
is	O
a	O
design	O
pattern	O
in	O
computer	B-General_Concept
science	I-General_Concept
,	O
used	O
with	O
languages	O
that	O
provide	O
run-time	O
type	O
information	O
about	O
objects	O
.	O
</s>
<s>
To	O
use	O
this	O
pattern	O
,	O
a	O
class	O
implements	O
a	O
marker	B-Language
interface	I-Language
(	O
also	O
called	O
tagging	B-Language
interface	I-Language
)	O
which	O
is	O
an	O
empty	O
interface	B-Application
,	O
and	O
methods	O
that	O
interact	O
with	O
instances	O
of	O
that	O
class	O
test	O
for	O
the	O
existence	O
of	O
the	O
interface	B-Application
.	O
</s>
<s>
Whereas	O
a	O
typical	O
interface	B-Application
specifies	O
functionality	O
(	O
in	O
the	O
form	O
of	O
method	O
declarations	O
)	O
that	O
an	O
implementing	O
class	O
must	O
support	O
,	O
a	O
marker	B-Language
interface	I-Language
need	O
not	O
do	O
so	O
.	O
</s>
<s>
The	O
mere	O
presence	O
of	O
such	O
an	O
interface	B-Application
indicates	O
specific	O
behavior	O
on	O
the	O
part	O
of	O
the	O
implementing	O
class	O
.	O
</s>
<s>
Hybrid	O
interfaces	B-Application
,	O
which	O
both	O
act	O
as	O
markers	O
and	O
specify	O
required	O
methods	O
,	O
are	O
possible	O
but	O
may	O
prove	O
confusing	O
if	O
improperly	O
used	O
.	O
</s>
<s>
An	O
example	O
of	O
the	O
application	O
of	O
marker	B-Language
interfaces	I-Language
from	O
the	O
Java	B-Language
programming	I-Language
language	I-Language
is	O
the	O
interface:A	O
class	O
implements	O
this	O
interface	B-Application
to	O
indicate	O
that	O
its	O
non-transient	O
data	O
members	O
can	O
be	O
written	O
to	O
an	O
.	O
</s>
<s>
The	O
ObjectOutputStream	O
private	O
method	O
writeObject0(Object,boolean )	O
contains	O
a	O
series	O
of	O
instanceof	O
tests	O
to	O
determine	O
writeability	O
,	O
one	O
of	O
which	O
looks	O
for	O
the	O
Serializable	O
interface	B-Application
.	O
</s>
<s>
A	O
major	O
problem	O
with	O
marker	B-Language
interfaces	I-Language
is	O
that	O
an	O
interface	B-Application
defines	O
a	O
contract	O
for	O
implementing	O
classes	O
,	O
and	O
that	O
contract	O
is	O
inherited	O
by	O
all	O
subclasses	O
.	O
</s>
<s>
Both	O
the	O
.NET	B-Application
Framework	I-Application
and	O
Java	B-Device
(	O
as	O
of	O
Java	B-Device
5	O
(	O
1.5	O
)	O
)	O
provide	O
support	O
for	O
such	O
metadata	O
.	O
</s>
<s>
In	O
.NET	B-Application
,	O
they	O
are	O
called	O
"	O
custom	O
attributes	O
"	O
,	O
in	O
Java	B-Device
they	O
are	O
called	O
"	O
annotations	B-Language
"	O
.	O
</s>
<s>
They	O
can	O
be	O
defined	O
on	O
classes	O
,	O
member	O
variables	O
,	O
methods	O
,	O
and	O
method	O
parameters	O
and	O
may	O
be	O
accessed	O
using	O
reflection	B-Language
.	O
</s>
<s>
In	O
Python	B-Language
,	O
the	O
term	O
"	O
marker	B-Language
interface	I-Language
"	O
is	O
common	O
in	O
Zope	B-Language
and	O
Plone	B-Language
.	O
</s>
<s>
Interfaces	B-Application
are	O
declared	O
as	O
metadata	O
and	O
subclasses	O
can	O
use	O
implementsOnly	O
to	O
declare	O
they	O
do	O
not	O
implement	O
everything	O
from	O
their	O
super	O
classes	O
.	O
</s>
