001 package railo.intergral.fusiondebug.server.type; 002 003 import java.util.List; 004 005 import railo.intergral.fusiondebug.server.type.coll.FDUDF; 006 import railo.intergral.fusiondebug.server.util.FDCaster; 007 import railo.runtime.type.UDF; 008 009 import com.intergral.fusiondebug.server.IFDStackFrame; 010 011 public abstract class FDNodeValueSupport extends FDValueSupport { 012 013 private IFDStackFrame frame; 014 015 public FDNodeValueSupport(IFDStackFrame frame){ 016 this.frame=frame; 017 } 018 019 public List getChildren() { 020 return getChildren(frame,getName(),getRawValue()); 021 } 022 023 024 /*public IFDValue getValue() { 025 Object value = getRawValue(); 026 if(isSimpleValue(value)) 027 return getFDNodeVariableSupport(); 028 return FDCaster.toFDVariable(getName(), value).getValue(); 029 }*/ 030 031 /** 032 * @see java.lang.Object#toString() 033 */ 034 public String toString() { 035 Object raw = getRawValue(); 036 if(raw instanceof UDF)return FDUDF.toString((UDF)raw); 037 return FDCaster.serialize(raw); 038 } 039 040 /** 041 * @see com.intergral.fusiondebug.server.IFDVariable#hasChildren() 042 */ 043 public boolean hasChildren() { 044 return hasChildren(getRawValue()); 045 } 046 047 protected abstract Object getRawValue(); 048 //protected abstract FDNodeValueSupport getFDNodeVariableSupport(); 049 }