EMMA Coverage Report (generated Mon Nov 01 16:48:29 PDT 2010)
[all classes][com.google.caja.ancillary.jsdoc]

COVERAGE SUMMARY FOR SOURCE FILE [InlineAnnotation.java]

nameclass, %method, %block, %line, %
InlineAnnotation.java100% (1/1)50%  (1/2)16%  (9/56)24%  (2.7/11)

COVERAGE BREAKDOWN BY CLASS AND METHOD

nameclass, %method, %block, %line, %
     
class InlineAnnotation100% (1/1)50%  (1/2)16%  (9/56)24%  (2.7/11)
InlineAnnotation (String, TextAnnotation, FilePosition): void 100% (1/1)69%  (9/13)89%  (2.7/3)
render (RenderContext): void 0%   (0/1)0%   (0/43)0%   (0/8)

1// Copyright (C) 2008 Google Inc.
2//
3// Licensed under the Apache License, Version 2.0 (the "License");
4// you may not use this file except in compliance with the License.
5// You may obtain a copy of the License at
6//
7//      http://www.apache.org/licenses/LICENSE-2.0
8//
9// Unless required by applicable law or agreed to in writing, software
10// distributed under the License is distributed on an "AS IS" BASIS,
11// WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
12// See the License for the specific language governing permissions and
13// limitations under the License.
14 
15package com.google.caja.ancillary.jsdoc;
16 
17import com.google.caja.lexer.FilePosition;
18import com.google.caja.lexer.TokenConsumer;
19import com.google.caja.reporting.RenderContext;
20import java.util.Collections;
21 
22/**
23 * An annotation that marks up a range of text, such as
24 * <pre>{&#x40;code code here}</pre>
25 *
26 * @author mikesamuel@gmail.com
27 */
28public final class InlineAnnotation extends AbstractAnnotation {
29  InlineAnnotation(String name, TextAnnotation value, FilePosition pos) {
30    super(name, Collections.singletonList(value), pos);
31    if (name == null) { throw new NullPointerException(); }
32  }
33 
34  public void render(RenderContext r) {
35    TokenConsumer tc = r.getOut();
36    tc.mark(getFilePosition());
37    tc.consume("{");
38    tc.consume("@" + getValue());
39    tc.consume(" ");
40    for (Annotation child : children()) { child.render(r); }
41    tc.consume("}");
42  }
43}

[all classes][com.google.caja.ancillary.jsdoc]
EMMA 2.0.5312 (C) Vladimir Roubtsov