AAPT2: Clean up R JavaDoc generation
- Don't generate private attributes in public R.java
- Strip out @SystemApi from comment when generating @android.annotation.SystemApi
- Only emit a single line (up to the first period) of an attribute's comment within
a styleable's attribute table.
Change-Id: Id6316a6861540325934133958939a12074ad4428
diff --git a/tools/aapt2/process/SymbolTable.h b/tools/aapt2/process/SymbolTable.h
index 0a6a4a5..e684bb0 100644
--- a/tools/aapt2/process/SymbolTable.h
+++ b/tools/aapt2/process/SymbolTable.h
@@ -51,9 +51,28 @@
class SymbolTable {
public:
struct Symbol {
+ Symbol() : Symbol(Maybe<ResourceId>{}) {
+ }
+
+ Symbol(const Maybe<ResourceId>& i) : Symbol(i, nullptr) {
+ }
+
+ Symbol(const Maybe<ResourceId>& i, const std::shared_ptr<Attribute>& attr) :
+ Symbol(i, attr, false) {
+ }
+
+ Symbol(const Maybe<ResourceId>& i, const std::shared_ptr<Attribute>& attr, bool pub) :
+ id(i), attribute(attr), isPublic(pub) {
+ }
+
+ Symbol(const Symbol&) = default;
+ Symbol(Symbol&&) = default;
+ Symbol& operator=(const Symbol&) = default;
+ Symbol& operator=(Symbol&&) = default;
+
Maybe<ResourceId> id;
std::shared_ptr<Attribute> attribute;
- bool isPublic;
+ bool isPublic = false;
};
SymbolTable() : mCache(200), mIdCache(200) {