<s>
at	B-Library
runtime	I-Library
.	O
</s>
<s>
Introspection	B-Application
should	O
not	O
be	O
confused	O
with	O
reflection	B-Language
,	O
which	O
goes	O
a	O
step	O
further	O
and	O
is	O
the	O
ability	O
for	O
a	O
program	O
to	O
manipulate	O
the	O
values	O
,	O
metadata	O
,	O
properties	O
,	O
and	O
functions	O
of	O
an	O
object	O
at	B-Library
runtime	I-Library
.	O
</s>
<s>
Java	B-Language
,	O
</s>
<s>
Python	B-Language
,	O
</s>
<s>
Julia	B-Application
,	O
</s>
<s>
Type	B-Application
introspection	I-Application
is	O
a	O
core	O
feature	O
of	O
Ruby	B-Language
.	O
</s>
<s>
In	O
Ruby	B-Language
,	O
the	O
Object	O
class	O
(	O
ancestor	O
of	O
every	O
class	O
)	O
provides	O
and	O
methods	O
for	O
checking	O
the	O
instance	O
's	O
class	O
.	O
</s>
<s>
For	O
example	O
,	O
consider	O
the	O
following	O
example	O
code	O
(	O
you	O
can	O
immediately	O
try	O
this	O
with	O
the	O
Interactive	O
Ruby	B-Language
Shell	O
)	O
:	O
</s>
<s>
In	O
the	O
example	O
above	O
,	O
the	O
class	O
is	O
used	O
as	O
any	O
other	O
class	O
in	O
Ruby	B-Language
.	O
</s>
<s>
In	O
Objective-C	B-Language
,	O
for	O
example	O
,	O
both	O
the	O
generic	O
Object	O
and	O
NSObject	O
(	O
in	O
Cocoa/OpenStep	O
)	O
provide	O
the	O
method	B-Language
which	O
returns	O
true	O
if	O
the	O
argument	O
to	O
the	O
method	B-Language
is	O
an	O
instance	O
of	O
the	O
specified	O
class	O
.	O
</s>
<s>
The	O
method	B-Language
analogously	O
returns	O
true	O
if	O
the	O
argument	O
inherits	O
from	O
the	O
specified	O
class	O
.	O
</s>
<s>
C++	O
supports	O
type	B-Application
introspection	I-Application
via	O
the	O
run-time	B-Application
type	I-Application
information	I-Application
(	O
RTTI	B-Application
)	O
typeid	O
and	O
dynamic_cast	O
keywords	O
.	O
</s>
<s>
Type	B-Application
introspection	I-Application
has	O
been	O
a	O
part	O
of	O
Object	O
Pascal	O
since	O
the	O
original	O
release	O
of	O
Delphi	O
,	O
which	O
uses	O
RTTI	B-Application
heavily	O
for	O
visual	O
form	O
design	O
.	O
</s>
<s>
In	O
Object	O
Pascal	O
,	O
all	O
classes	O
descend	O
from	O
the	O
base	O
TObject	O
class	O
,	O
which	O
implements	O
basic	O
RTTI	B-Application
functionality	O
.	O
</s>
<s>
Every	O
class	O
's	O
name	O
can	O
be	O
referenced	O
in	O
code	O
for	O
RTTI	B-Application
purposes	O
;	O
the	O
class	O
name	O
identifier	O
is	O
implemented	O
as	O
a	O
pointer	O
to	O
the	O
class	O
's	O
metadata	O
,	O
which	O
can	O
be	O
declared	O
and	O
used	O
as	O
a	O
variable	O
of	O
type	O
TClass	O
.	O
</s>
<s>
Deeper	O
introspection	B-Application
(	O
enumerating	O
fields	O
and	O
methods	O
)	O
is	O
traditionally	O
only	O
supported	O
for	O
objects	O
declared	O
in	O
the	O
$M+	O
(	O
a	O
pragma	O
)	O
state	O
,	O
typically	O
TPersistent	O
,	O
and	O
only	O
for	O
symbols	O
defined	O
in	O
the	O
published	O
section	O
.	O
</s>
<s>
The	O
simplest	O
example	O
of	O
type	B-Application
introspection	I-Application
in	O
Java	B-Language
is	O
the	O
operator	O
.	O
</s>
<s>
The	O
class	O
is	O
the	O
basis	O
of	O
more	O
advanced	O
introspection	B-Application
.	O
</s>
<s>
In	O
PHP	B-Application
introspection	B-Application
can	O
be	O
done	O
using	O
operator	O
.	O
</s>
<s>
Introspection	B-Application
can	O
be	O
achieved	O
using	O
the	O
and	O
functions	O
in	O
Perl	B-Language
.	O
</s>
<s>
Much	O
more	O
powerful	O
introspection	B-Application
in	O
Perl	B-Language
can	O
be	O
achieved	O
using	O
the	O
Moose	B-Language
object	O
system	O
and	O
the	O
meta-object	O
protocol	O
;	O
for	O
example	O
,	O
you	O
can	O
check	O
if	O
a	O
given	O
object	O
does	O
a	O
role	B-General_Concept
:	O
</s>
<s>
The	O
most	O
common	O
method	B-Language
of	O
introspection	B-Application
in	O
Python	B-Language
is	O
using	O
the	O
function	O
to	O
detail	O
the	O
attributes	O
of	O
an	O
object	O
.	O
</s>
<s>
In	O
ActionScript	B-Operating_System
,	O
the	O
function	O
flash.utils.getQualifiedClassName	O
can	O
be	O
used	O
to	O
retrieve	O
the	O
class/type	O
name	O
of	O
an	O
arbitrary	O
object	O
.	O
</s>
<s>
This	O
second	O
function	O
can	O
be	O
used	O
to	O
test	O
class	B-Language
inheritance	I-Language
parents	O
as	O
well	O
:	O
</s>
<s>
Like	O
Perl	B-Language
,	O
ActionScript	B-Operating_System
can	O
go	O
further	O
than	O
getting	O
the	O
class	O
name	O
,	O
but	O
all	O
the	O
metadata	O
,	O
functions	O
and	O
other	O
elements	O
that	O
make	O
up	O
an	O
object	O
using	O
the	O
flash.utils.describeType	O
function	O
;	O
this	O
is	O
used	O
when	O
implementing	O
reflection	B-Language
in	O
ActionScript	B-Operating_System
.	O
</s>
