001    package railo.runtime.interpreter.ref.literal;
002    
003    import railo.runtime.exp.PageException;
004    import railo.runtime.interpreter.ref.Ref;
005    import railo.runtime.interpreter.ref.RefSupport;
006    import railo.runtime.interpreter.ref.util.RefUtil;
007    
008    
009    
010    /**
011     * Literal String
012     *
013     */
014    public final class LString extends RefSupport implements Literal {
015            
016            
017            private String str;
018    
019        /**
020             * constructor of the class
021         * @param str 
022             */
023            public LString(String str) {
024            this.str=str;
025            }
026            
027    
028        /**
029             * @see railo.runtime.interpreter.ref.Ref#getValue()
030             */
031            public Object getValue() {
032                    return str;
033            }       
034    
035            /**
036             * @see java.lang.Object#toString()
037             */
038            public String toString() {
039                    return getString();
040            }
041    
042            /**
043             * @see railo.runtime.interpreter.ref.Ref#getTypeName()
044             */
045            public String getTypeName() {
046                    return "literal";
047            }
048    
049        /**
050         * @see railo.runtime.interpreter.ref.literal.Literal#getString()
051         */
052        public String getString() {
053            return str;
054        }
055    
056            /**
057             * @see railo.runtime.interpreter.ref.Ref#eeq(railo.runtime.interpreter.ref.Ref)
058             */
059            public boolean eeq(Ref other) throws PageException {
060                    return RefUtil.eeq(this,other);
061            }
062    }