001    /**
002     * Implements the Cold Fusion Function createdate
003     */
004    package railo.runtime.functions.component;
005    
006    import railo.runtime.Component;
007    import railo.runtime.PageContext;
008    import railo.runtime.ext.function.Function;
009    import railo.runtime.tag.util.DeprecatedUtil;
010    import railo.runtime.type.KeyImpl;
011    import railo.runtime.type.Struct;
012    import railo.runtime.type.StructImpl;
013    
014    /**
015     * @deprecated use function GetMetaData instead
016     *
017     */
018    public final class ComponentInfo implements Function {
019            public static Struct call(PageContext pc , Component component) {
020                    DeprecatedUtil.function(pc, "ComponentInfo", "GetMetaData");
021                    Struct sct=new StructImpl();
022                sct.setEL(KeyImpl.NAME,component.getName());
023                sct.setEL("fullname",component.getCallName());
024                String extend = component.getExtends();
025                if(extend==null || extend.length()==0)extend="Component";
026                sct.setEL("extends",extend);
027                sct.setEL(KeyImpl.HINT,component.getHint());
028                    
029                return sct;
030            }
031    }