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