public boolean render(InternalContextAdapter context,Writer writer) throws IOException, MethodInvocationException {
  if (referenceType == RUNT) {
    writer.write(rootString);
    return true;
  }
  Object value=execute(null,context);
  if (escaped) {
    if (value == null) {
      writer.write(escPrefix);
      writer.write("\\");
      writer.write(nullString);
    }
 else {
      writer.write(escPrefix);
      writer.write(nullString);
    }
    return true;
  }
  EventCartridge ec=context.getEventCartridge();
  if (ec != null) {
    value=ec.referenceInsert(literal,value);
  }
  if (value == null) {
    writer.write(escPrefix);
    writer.write(escPrefix);
    writer.write(morePrefix);
    writer.write(nullString);
    if (referenceType != QUIET_REFERENCE && rsvc.getBoolean(RuntimeConstants.RUNTIME_LOG_REFERENCE_LOG_INVALID,true)) {
      rsvc.warn(new ReferenceException("reference : template = " + context.getCurrentTemplateName(),this));
    }
    return true;
  }
 else {
    writer.write(escPrefix);
    writer.write(morePrefix);
    writer.write(value.toString());
    return true;
  }
}

public boolean render ( InternalContextAdapter context , Writer writer ) throws IOException , MethodInvocationException { if ( referenceType == RUNT ) { writer . write ( rootString ) ; return true ; } Object value = execute ( null , context ) ; if ( escaped ) { if ( value == null ) { writer . write ( escPrefix ) ; writer . write ( "\\" ) ; writer . write ( nullString ) ; } else { writer . write ( escPrefix ) ; writer . write ( nullString ) ; } return true ; } EventCartridge ec = context . getEventCartridge ( ) ; if ( ec != null ) { value = ec . referenceInsert ( literal , value ) ; } if ( value == null ) { writer . write ( escPrefix ) ; writer . write ( escPrefix ) ; writer . write ( morePrefix ) ; writer . write ( nullString ) ; if ( referenceType != QUIET_REFERENCE && rsvc . getBoolean ( RuntimeConstants . RUNTIME_LOG_REFERENCE_LOG_INVALID , true ) ) { rsvc . warn ( new ReferenceException ( "reference : template = " + context . getCurrentTemplateName ( ) , this ) ) ; } return true ; } else { writer . write ( escPrefix ) ; writer . write ( morePrefix ) ; writer . write ( value . toString ( ) ) ; return true ; } }
gets the value of the reference and outputs it to the writer .
