com.google.sitebricks.compiler
Class AnnotationParser

java.lang.Object
  extended by com.google.sitebricks.compiler.AnnotationParser

public class AnnotationParser
extends Object

Author:
shawn

Field Summary
static Pattern WIDGET_ANNOTATION_REGEX
           
 
Constructor Summary
AnnotationParser()
           
 
Method Summary
static String[] extractKeyAndContent(String annotation)
           
static String readAnnotation(org.jsoup.nodes.Node node)
           
static String readAnnotation(String text)
           
static String stripAnnotation(String text)
           
 
Methods inherited from class java.lang.Object
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait
 

Field Detail

WIDGET_ANNOTATION_REGEX

public static final Pattern WIDGET_ANNOTATION_REGEX
Constructor Detail

AnnotationParser

public AnnotationParser()
Method Detail

readAnnotation

public static String readAnnotation(String text)

readAnnotation

public static String readAnnotation(org.jsoup.nodes.Node node)

stripAnnotation

public static String stripAnnotation(String text)

extractKeyAndContent

public static String[] extractKeyAndContent(String annotation)
Parameters:
annotation - A string representing an unparsed annotation of the form:
 "@MyAnn(property = [expr], ...)"
Returns:
A partially parsed array following this structure:
  [0] -> "MyAnn" 
[1] -> "prop = [expr], ..."


Copyright © 2014. All rights reserved.