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.transformer.bytecode.expression.var;
020
021import lucee.transformer.bytecode.expression.ExprString;
022import lucee.transformer.bytecode.literal.LitString;
023import lucee.transformer.library.function.FunctionLibFunction;
024
025
026
027public final class BIF extends FunctionMember {
028                private static String ANY="any";
029        
030                private ExprString name;
031                private int argType;
032                private Class clazz;
033                private String returnType=ANY;
034                private FunctionLibFunction flf;
035
036
037
038                public BIF(ExprString name, FunctionLibFunction flf) {
039                        this.name=name;
040                        this.flf=flf;
041                }
042                public BIF(String name, FunctionLibFunction flf) {
043                        this.name=LitString.toExprString(name);
044                        this.flf=flf;
045                }
046
047                public void setArgType(int argType) {
048                        this.argType=argType;
049                }
050
051                public void setClass(Class clazz) {
052                        this.clazz=clazz;
053                }
054
055                public void setReturnType(String returnType) {
056                        this.returnType=returnType;
057                }
058
059                /**
060                 * @return the argType
061                 */
062                public int getArgType() {
063                        return argType;
064                }
065
066                /**
067                 * @return the class
068                 */
069                public Class getClazz() {
070                        return clazz;
071                }
072
073                /**
074                 * @return the name
075                 */
076                public ExprString getName() {
077                        return name;
078                }
079
080                /**
081                 * @return the returnType
082                 */
083                public String getReturnType() {
084                        return returnType;
085                }
086
087                /**
088                 * @return the flf
089                 */
090                public FunctionLibFunction getFlf() {
091                        return flf;
092                }
093
094                /**
095                 * @param flf the flf to set
096                 */
097                public void setFlf(FunctionLibFunction flf) {
098                        this.flf = flf;
099                }
100        }