001 package railo.runtime.interpreter.ref.op; 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.op.Caster; 008 009 /** 010 * Concat operation 011 */ 012 public final class Concat extends RefSupport implements Ref { 013 014 private Ref right; 015 private Ref left; 016 private PageContext pc; 017 018 /** 019 * constructor of the class 020 * @param left 021 * @param right 022 */ 023 public Concat(PageContext pc,Ref left, Ref right) { 024 this.pc=pc; 025 this.left=left; 026 this.right=right; 027 } 028 029 /** 030 * @see railo.runtime.interpreter.ref.Ref#getValue() 031 */ 032 public Object getValue() throws PageException { 033 return Caster.toString(left.getValue())+Caster.toString(right.getValue()); 034 } 035 036 /** 037 * @see railo.runtime.interpreter.ref.Ref#getTypeName() 038 */ 039 public String getTypeName() { 040 return "operation"; 041 } 042 }