001    /*
002    // $Id: //open/mondrian/src/main/mondrian/calc/DummyExp.java#5 $
003    // This software is subject to the terms of the Common Public License
004    // Agreement, available at the following URL:
005    // http://www.opensource.org/licenses/cpl.html.
006    // Copyright (C) 2006-2006 Julian Hyde
007    // All Rights Reserved.
008    // You must accept the terms of that agreement to use this software.
009    */
010    package mondrian.calc;
011    
012    import mondrian.olap.*;
013    import mondrian.olap.type.Type;
014    import mondrian.mdx.MdxVisitor;
015    
016    import java.io.PrintWriter;
017    
018    /**
019     * Dummy expression which exists only to wrap a
020     * {@link mondrian.olap.type.Type}.
021     *
022     * @author jhyde
023     * @version $Id: //open/mondrian/src/main/mondrian/calc/DummyExp.java#5 $
024     * @since Sep 26, 2005
025     */
026    public class DummyExp implements Exp {
027        private final Type type;
028    
029        public DummyExp(Type type) {
030            this.type = type;
031        }
032    
033        public DummyExp clone() {
034            throw new UnsupportedOperationException();
035        }
036    
037        public int getCategory() {
038            throw new UnsupportedOperationException();
039        }
040    
041        public Type getType() {
042            return type;
043        }
044    
045        public void unparse(PrintWriter pw) {
046            throw new UnsupportedOperationException();
047        }
048    
049        public Exp accept(Validator validator) {
050            throw new UnsupportedOperationException();
051        }
052    
053        public Calc accept(ExpCompiler compiler) {
054            throw new UnsupportedOperationException();
055        }
056    
057        public Object accept(MdxVisitor visitor) {
058            throw new UnsupportedOperationException();
059        }
060    
061    }
062    
063    // End DummyExp.java