com.google.sitebricks.compiler
Class AnnotationParser
java.lang.Object
com.google.sitebricks.compiler.AnnotationParser
public class AnnotationParser
- extends Object
- Author:
- shawn
| Methods inherited from class java.lang.Object |
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait |
WIDGET_ANNOTATION_REGEX
public static final Pattern WIDGET_ANNOTATION_REGEX
AnnotationParser
public AnnotationParser()
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.