com.google.caja.reporting
Class RenderContext

java.lang.Object
  extended by com.google.caja.reporting.RenderContext

public class RenderContext
extends java.lang.Object

Author:
mikesamuel@gmail.com
See Also:
Renderable

Field Summary
private  boolean asciiOnly
          Produce output that only contains lower 7-bit characters.
private  boolean embeddable
          Produce output that can be safely embedded.
private  boolean json
          Should javascript output be rendered using JSON conventions.
private  MarkupRenderMode markupMode
          True iff DOM tree nodes should be rendered as XML.
private  TokenConsumer out
           
private  boolean rawObjKeys
          True iff object ctor keys that are JS identifiers can be rendered without quotes.
 
Constructor Summary
private RenderContext(boolean asciiOnly, boolean embeddable, boolean json, MarkupRenderMode markupMode, boolean rawObjKeys, TokenConsumer out)
           
  RenderContext(TokenConsumer out)
           
 
Method Summary
 boolean asJson()
           
 boolean asXml()
          True iff DOM tree nodes should be rendered as XML.
 TokenConsumer getOut()
           
 boolean isAsciiOnly()
          True if the renderer produces output that only contains characters in [\1-\x7f].
 boolean isEmbeddable()
          True if the renderer produces output that can be embedded inside a CDATA section, or script element without further escaping?
 MarkupRenderMode markupRenderMode()
           
 boolean rawObjKeys()
           
 RenderContext withAsciiOnly(boolean b)
           
 RenderContext withAsXml(boolean b)
          Deprecated. 
 RenderContext withEmbeddable(boolean b)
           
 RenderContext withJson(boolean b)
           
 RenderContext withMarkupRenderMode(MarkupRenderMode markupMode)
           
 RenderContext withRawObjKeys(boolean b)
           
 
Methods inherited from class java.lang.Object
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait
 

Field Detail

embeddable

private final boolean embeddable
Produce output that can be safely embedded.


asciiOnly

private final boolean asciiOnly
Produce output that only contains lower 7-bit characters.


json

private final boolean json
Should javascript output be rendered using JSON conventions.


markupMode

private final MarkupRenderMode markupMode
True iff DOM tree nodes should be rendered as XML.


rawObjKeys

private final boolean rawObjKeys
True iff object ctor keys that are JS identifiers can be rendered without quotes.


out

private final TokenConsumer out
Constructor Detail

RenderContext

public RenderContext(TokenConsumer out)

RenderContext

private RenderContext(boolean asciiOnly,
                      boolean embeddable,
                      boolean json,
                      MarkupRenderMode markupMode,
                      boolean rawObjKeys,
                      TokenConsumer out)
Method Detail

isEmbeddable

public final boolean isEmbeddable()
True if the renderer produces output that can be embedded inside a CDATA section, or script element without further escaping?


isAsciiOnly

public final boolean isAsciiOnly()
True if the renderer produces output that only contains characters in [\1-\x7f].


asJson

public final boolean asJson()

asXml

public final boolean asXml()
True iff DOM tree nodes should be rendered as XML.


markupRenderMode

public final MarkupRenderMode markupRenderMode()

rawObjKeys

public final boolean rawObjKeys()

getOut

public final TokenConsumer getOut()

withAsciiOnly

public RenderContext withAsciiOnly(boolean b)

withEmbeddable

public RenderContext withEmbeddable(boolean b)

withJson

public RenderContext withJson(boolean b)

withMarkupRenderMode

public RenderContext withMarkupRenderMode(MarkupRenderMode markupMode)

withAsXml

@Deprecated
public RenderContext withAsXml(boolean b)
Deprecated. 


withRawObjKeys

public RenderContext withRawObjKeys(boolean b)


Copyright (C) 2008 Google Inc.
Licensed under the Apache License, Version 2.0