Interface methods can now be annotated.

The syntax is a strict subset of what Java supports. The following are valid
annotations:

@Fragile
@LotsOfStuff(single="yes", many={"a", "b", "c"})

An annotation either has no parameters (in which case the name is NOT followed
by parentheses) or is does and what follows the name is a parenthesized list
of name=value pairs, where each value is either a single quoted string literal
or a list of quoted string literals surrounded by curly braces.

Change-Id: I3c51d771b7d55c8d16531286d011f61be700a21c
diff --git a/Annotation.h b/Annotation.h
new file mode 100644
index 0000000..ad98bf9
--- /dev/null
+++ b/Annotation.h
@@ -0,0 +1,32 @@
+#ifndef ANNOTATION_H_
+
+#define ANNOTATION_H_
+
+#include <android-base/macros.h>
+
+#include <string>
+#include <utils/KeyedVector.h>
+
+namespace android {
+
+struct Formatter;
+
+struct Annotation {
+    Annotation(
+            const char *name,
+            KeyedVector<std::string, std::vector<std::string> *> *params);
+
+    std::string name() const;
+
+    void dump(Formatter &out) const;
+
+private:
+    std::string mName;
+    KeyedVector<std::string, std::vector<std::string> *> *mParamsByName;
+
+    DISALLOW_COPY_AND_ASSIGN(Annotation);
+};
+
+}  // namespace android
+
+#endif  // ANNOTATION_H_