View comments | RSS feed
Contents > CFML Reference > ColdFusion Functions > GetMetaData PreviousNext

GetMetaData

Gets metadata (the methods, properties, and parameters of a component) associated with an object that is deployed on the ColdFusion server. This functionality, called introspection, lets applications dynamically determine how to use a component.

Key-value pairs, as a component descriptor data structure or as structured XML

System functions

GetMetaData(object)

or, if used within a ColdFusion component:

GetMetaData(this)

ColdFusion MX: Added this function.

Parameter

Description

object

Reference to an object; use this attribute to call a function from a CFML page

this

Reference to an object; use this attribute to call a function from a component.

The this scope is available at runtime to the component body and to the invoked method's function body. It is used to read and write variables that are present during the life of the component.

Component metadata contains at least the following keys:

Other component attributes are returned as additional keys.

Function metadata contains at least the following keys:

Other function attributes are returned as additional keys.

Argument metadata contains at least the following key:

Other argument attributes are returned as additional keys.

Property metadata contains at least the following key:

Other property attributes are returned as additional keys.


Contents > CFML Reference > ColdFusion Functions > GetMetaData PreviousNext

ColdFusion 9 | ColdFusion 8 | ColdFusion MX 7 | ColdFusion MX 6.1 | ColdFusion MX | Forums | Developer Center | Bug Reporting

Version 6.1

Comments are no longer accepted for ColdFusion MX 6.1. ColdFusion 8 is the current version.

Comments


Robin Hilliard said on Mar 16, 2004 at 5:13 AM :
Warning - getMetaData() does not return an ordinary struct. You
can't duplicate() the result, and if you try assigning the result to a
variable it doesn't seem to stick beyond the scope of the function in
which you performed the assignment (this was very strange).

Interestingly you can write into the structure returned by
getMetaData(), and it turns out to be a static (i.e. class level) scope.
This can be handy, for instance you can add structures that index
function and property definitions by name to save iterating through
the usual functions and properties arrays.

See also:
http://www.camdenfamily.com/morpheus/blog/index.cfm?
mode=entry&entry=884A55B6-DE45-A014-C1AB17377EC2A269

 

RSS feed | Send me an e-mail when comments are added to this page | Comment Report

Current page: http://livedocs.adobe.com/coldfusion/6.1/htmldocs/funct102.htm