com.google.caja.parser.js
Class JsonMLCompatible.JsonMLBuilder

java.lang.Object
  extended by com.google.caja.parser.js.JsonMLCompatible.JsonMLBuilder
Enclosing interface:
JsonMLCompatible

public static final class JsonMLCompatible.JsonMLBuilder
extends java.lang.Object

A builder object.


Field Summary
private  java.util.EnumMap<com.google.javascript.jscomp.jsonml.TagAttr,java.lang.Object> attrs
           
private  java.util.List<com.google.javascript.jscomp.jsonml.JsonML> children
           
private  com.google.javascript.jscomp.jsonml.TagType type
           
 
Constructor Summary
private JsonMLCompatible.JsonMLBuilder(com.google.javascript.jscomp.jsonml.TagType type, FilePosition pos)
           
 
Method Summary
 JsonMLCompatible.JsonMLBuilder addChild(com.google.javascript.jscomp.jsonml.JsonML child)
           
 JsonMLCompatible.JsonMLBuilder addChild(JsonMLCompatible child)
           
 JsonMLCompatible.JsonMLBuilder addChildIfNotNull(JsonMLCompatible child)
           
 JsonMLCompatible.JsonMLBuilder addChildren(java.lang.Iterable<? extends JsonMLCompatible> children)
           
 com.google.javascript.jscomp.jsonml.JsonML build()
           
static JsonMLCompatible.JsonMLBuilder builder(com.google.javascript.jscomp.jsonml.TagType type, FilePosition pos)
           
 boolean hasChildren()
           
 JsonMLCompatible.JsonMLBuilder setAttribute(com.google.javascript.jscomp.jsonml.TagAttr a, java.lang.Object value)
           
 JsonMLCompatible.JsonMLBuilder setAttributeIfNotBlank(com.google.javascript.jscomp.jsonml.TagAttr a, java.lang.Object value)
           
 
Methods inherited from class java.lang.Object
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait
 

Field Detail

type

private final com.google.javascript.jscomp.jsonml.TagType type

attrs

private final java.util.EnumMap<com.google.javascript.jscomp.jsonml.TagAttr,java.lang.Object> attrs

children

private final java.util.List<com.google.javascript.jscomp.jsonml.JsonML> children
Constructor Detail

JsonMLCompatible.JsonMLBuilder

private JsonMLCompatible.JsonMLBuilder(com.google.javascript.jscomp.jsonml.TagType type,
                                       FilePosition pos)
Method Detail

builder

public static JsonMLCompatible.JsonMLBuilder builder(com.google.javascript.jscomp.jsonml.TagType type,
                                                     FilePosition pos)

setAttribute

public JsonMLCompatible.JsonMLBuilder setAttribute(com.google.javascript.jscomp.jsonml.TagAttr a,
                                                   java.lang.Object value)

setAttributeIfNotBlank

public JsonMLCompatible.JsonMLBuilder setAttributeIfNotBlank(com.google.javascript.jscomp.jsonml.TagAttr a,
                                                             java.lang.Object value)

addChild

public JsonMLCompatible.JsonMLBuilder addChild(com.google.javascript.jscomp.jsonml.JsonML child)

addChild

public JsonMLCompatible.JsonMLBuilder addChild(JsonMLCompatible child)

addChildIfNotNull

public JsonMLCompatible.JsonMLBuilder addChildIfNotNull(JsonMLCompatible child)

addChildren

public JsonMLCompatible.JsonMLBuilder addChildren(java.lang.Iterable<? extends JsonMLCompatible> children)

hasChildren

public boolean hasChildren()

build

public com.google.javascript.jscomp.jsonml.JsonML build()


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