001/**
002 *
003 * Copyright (c) 2014, the Railo Company Ltd. All rights reserved.
004 *
005 * This library is free software; you can redistribute it and/or
006 * modify it under the terms of the GNU Lesser General Public
007 * License as published by the Free Software Foundation; either 
008 * version 2.1 of the License, or (at your option) any later version.
009 * 
010 * This library is distributed in the hope that it will be useful,
011 * but WITHOUT ANY WARRANTY; without even the implied warranty of
012 * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE.  See the GNU
013 * Lesser General Public License for more details.
014 * 
015 * You should have received a copy of the GNU Lesser General Public 
016 * License along with this library.  If not, see <http://www.gnu.org/licenses/>.
017 * 
018 **/
019package lucee.runtime.type.trace;
020
021import lucee.runtime.Component;
022import lucee.runtime.ComponentImpl;
023import lucee.runtime.PageContext;
024import lucee.runtime.PageSource;
025import lucee.runtime.component.Member;
026import lucee.runtime.debug.Debugger;
027import lucee.runtime.exp.PageException;
028import lucee.runtime.type.Collection;
029import lucee.runtime.type.FunctionArgument;
030import lucee.runtime.type.Struct;
031import lucee.runtime.type.UDF;
032import lucee.runtime.type.UDFPlus;
033import lucee.runtime.type.util.ComponentUtil;
034import lucee.runtime.type.util.UDFUtil;
035
036public class TOUDF extends TOObjects implements UDFPlus,Member {
037
038        private UDFPlus udf;
039        
040        protected TOUDF(Debugger debugger,UDFPlus udf, int type, String category, String text) {
041                super(debugger,udf,type,category,text);
042                this.udf=udf;
043        }
044        
045        
046
047        @Override
048        public int getAccess() {
049                log(null);
050                return udf.getAccess();
051        }
052        
053        public void setAccess(int access) {
054                log(ComponentUtil.toStringAccess(access,null));
055                udf.setAccess(access);
056        }
057
058
059        @Override
060        public Object getValue() {
061                log(null);
062                return udf.getValue();
063        }
064
065
066        @Override
067        public Object implementation(PageContext pageContext) throws Throwable {
068                log(null);
069                return udf.implementation(pageContext);
070        }
071
072
073        @Override
074        public FunctionArgument[] getFunctionArguments() {
075                log(null);
076                return udf.getFunctionArguments();
077        }
078
079
080        @Override
081        public Object getDefaultValue(PageContext pc, int index)
082                        throws PageException {
083                log(null);
084                return udf.getDefaultValue(pc, index);
085        }
086        @Override
087        public Object getDefaultValue(PageContext pc, int index, Object defaultValue) throws PageException {
088                log(null);
089                return UDFUtil.getDefaultValue(pc, udf, index, defaultValue);
090        }
091
092
093        @Override
094        public String getFunctionName() {
095                log(null);
096                return udf.getFunctionName();
097        }
098
099
100        @Override
101        public boolean getOutput() {
102                log(null);
103                return udf.getOutput();
104        }
105
106
107        @Override
108        public int getReturnType() {
109                log(null);
110                return udf.getReturnType();
111        }
112
113        @Override
114        public int getReturnFormat() {
115                log(null);
116                return udf.getReturnFormat();
117        }
118        
119        @Override
120        public int getReturnFormat(int defaultValue) {
121                log(null);
122                return udf.getReturnFormat(defaultValue);
123        }
124
125        @Override
126        public Boolean getSecureJson() {
127                log(null);
128                return udf.getSecureJson();
129        }
130
131
132        @Override
133        public Boolean getVerifyClient() {
134                log(null);
135                return udf.getVerifyClient();
136        }
137
138
139        @Override
140        public String getReturnTypeAsString() {
141                log(null);
142                return udf.getReturnTypeAsString();
143        }
144
145
146        @Override
147        public String getDescription() {
148                log(null);
149                return udf.getDescription();
150        }
151
152
153        @Override
154        public Object callWithNamedValues(PageContext pageContext, Struct values,
155                        boolean doIncludePath) throws PageException {
156                log(null);
157                return udf.callWithNamedValues(pageContext, values, doIncludePath);
158        }
159
160        @Override
161        public Object callWithNamedValues(PageContext pageContext, Collection.Key calledName, Struct values,
162                        boolean doIncludePath) throws PageException {
163                log(null);
164                return udf.callWithNamedValues(pageContext, calledName, values, doIncludePath);
165        }
166
167
168        @Override
169        public Object call(PageContext pageContext, Object[] args,
170                        boolean doIncludePath) throws PageException {
171                log(null);
172                return udf.call(pageContext, args, doIncludePath);
173        }
174
175
176        @Override
177        public Object call(PageContext pageContext, Collection.Key calledName, Object[] args,
178                        boolean doIncludePath) throws PageException {
179                log(null);
180                return udf.call(pageContext,calledName, args, doIncludePath);
181        }
182
183
184        @Override
185        public String getDisplayName() {
186                log(null);
187                return udf.getDisplayName();
188        }
189
190
191        @Override
192        public String getHint() {
193                log(null);
194                return udf.getHint();
195        }
196
197        @Override
198        public PageSource getPageSource() {
199                log(null);
200                return udf.getPageSource();
201        }
202        
203        public int getIndex(){
204                log(null);
205                return udf.getIndex();
206        }
207
208
209        @Override
210        public Struct getMetaData(PageContext pc) throws PageException {
211                log(null);
212                return udf.getMetaData(pc);
213        }
214
215        @Override
216        public UDF duplicate() {
217                log(null);
218                return udf.duplicate();
219        }
220
221
222        @Override
223        public Component getOwnerComponent() {
224                log(null);
225                return udf.getOwnerComponent();
226        }
227        public void setOwnerComponent(ComponentImpl cfc) {
228                log(null);
229                udf.setOwnerComponent(cfc);
230        }
231        
232        
233}