Beispiel #1
0
        public static Evaluator getEvaluator(Integer typeObj,
                                             Integer operObj)
        {
            int type = typeObj.intValue();
            int oper = operObj.intValue();

            switch (type)
            {
            case Evaluator.__Fields.STRING_TYPE:
                return(StringFactory.getStringEvaluator(oper));

            case Evaluator.__Fields.OBJECT_TYPE:
                return(ObjectFactory.getObjectEvaluator(oper));

            case Evaluator.__Fields.SHORT_TYPE:
                return(ShortFactory.getShortEvaluator(oper));

            case Evaluator.__Fields.INTEGER_TYPE:
                return(IntegerFactory.getIntegerEvaluator(oper));

            case Evaluator.__Fields.BOOLEAN_TYPE:
                return(BooleanFactory.getBooleanEvaluator(oper));

            case Evaluator.__Fields.DOUBLE_TYPE:
                return(DoubleFactory.getDoubleEvaluator(oper));

            case Evaluator.__Fields.CHAR_TYPE:
                return(CharacterFactory.getCharacterEvaluator(oper));

            case Evaluator.__Fields.BYTE_TYPE:
                return(ByteFactory.getByteEvaluator(oper));

            case Evaluator.__Fields.FLOAT_TYPE:
                return(FloatFactory.getFloatEvaluator(oper));

            case Evaluator.__Fields.LONG_TYPE:
                return(LongFactory.getLongEvaluator(oper));

            case Evaluator.__Fields.DATE_TYPE:
                return(DateFactory.getDateEvaluator(oper));

            case Evaluator.__Fields.ARRAY_TYPE:
                return(ArrayFactory.getArrayEvaluator(oper));

            default:
                throw new RuntimeException("Type '" + type + "' does not exist for BaseEvaluator.__FieldsFactory");
            }
        }