001    package railo.transformer.bytecode.expression;
002    
003    import org.objectweb.asm.Type;
004    
005    import railo.runtime.exp.TemplateException;
006    import railo.transformer.bytecode.BytecodeContext;
007    import railo.transformer.bytecode.BytecodeException;
008    
009    
010    /**
011     * A Expression (Operation, Literal aso.)
012     */
013    public interface Expression {
014    
015        /**
016         * Field <code>MODE_REF</code>
017         */
018        public static final int MODE_REF=0;
019        /**
020         * Field <code>MODE_VALUE</code>
021         */
022        public static final int MODE_VALUE=1;
023        
024        /**
025         * write out the stament to adapter
026         * @param adapter
027         * @param mode 
028         * @return return Type of expression
029         * @throws TemplateException
030         */
031        public Type writeOut(BytecodeContext bc, int mode) throws BytecodeException;
032    
033        /**
034         * Returns the value of line.
035         * @return value line
036         */
037        public int getLine();
038        
039        /* *T ODO entfernen/ersetzten durch return type von writeOut();
040         * @return return type as String (Types.XYZ)
041         */
042        //public char getType();
043    
044    
045            public void setLine(int l);
046    }