Tuesday, 7 August 2012

ClassViewer.cfc

G'day
This is just a quick follow-up to my previous entry about ClassViewer.java.



Here's the CF version:


The API docs for it are as follows:

shared.CF.data_types.cv.ClassViewer
Component ClassViewer 


An almost pure CFML implementation of ClassViewer.class.

hierarchy:WEB-INF.cftags.component
      shared.CF.data_types.cv.ClassViewer
path:C:\ColdFusion10\cfusion\wwwroot\shared\CF\data_types\cv\ClassViewer.cfc
serializable:Yes
properties:
methods:viewClass, viewClassByName, viewObject, inspectConstructor*, inspectMethod*
* - private method

viewClass
public String viewClass ( any class ) 

Returns a string containing information on the specified class. The string returned is best output within PRE tags.

Output:
Parameters:
   class: any, optional, class - A Java Class object. 
viewClassByName
public String viewClassByName ( String className ) 

Returns a string containing information on the specified Java class. The string returned is best output within PRE tags.

Output:
Parameters:
   className: String, optional, className - A Java class name to return reflection data of. 
viewObject
public String viewObject ( any object ) 

Returns a string containing information on the specified object. The string returned is best output within PRE tags.

Output:
Parameters:
   object: any, optional, object - A Java Object. 
inspectConstructor*
private String inspectConstructor ( any constructor ) 

Returns a string containing information on the specified constructor

Output:
Parameters:
   constructor: any, optional, constructor - A Java Constructor object. 
inspectMethod*
private String inspectMethod ( any method ) 

Returns a string containing information on the specified method

Output:
Parameters:
   method: any, optional, method - A Java Method object. 

Feel free to do with this what you will.

Cheers.

--
Adam