001    /**
002     * Implements the CFML 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.Struct;
011    import railo.runtime.type.StructImpl;
012    import railo.runtime.type.util.KeyConstants;
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(KeyConstants._name,component.getName());
023                sct.setEL(KeyConstants._fullname,component.getCallName());
024                String extend = component.getExtends();
025                if(extend==null || extend.length()==0)extend="Component";
026                sct.setEL(KeyConstants._extends,extend);
027                sct.setEL(KeyConstants._hint,component.getHint());
028                    
029                return sct;
030            }
031    }