class AidlTypeSpecifier
Defined at line 412 of file ../../third_party/android/platform/system/tools/aidl/aidl_language.h
AidlTypeSpecifier represents a reference to either a built-in type,
a defined type, or a variant (e.g., array of generic) of a type.
Public Methods
void AidlTypeSpecifier (const AidlLocation & location, const string & unresolved_name, std::optional<ArrayType> array, vector<unique_ptr<AidlTypeSpecifier>> * type_params, const Comments & comments)
void ViewAsArrayBase (std::function<void (const AidlTypeSpecifier &)> func)
View of this type which has one-less dimension(s).
e.g.) T[] => T, T[N][M] => T[M]
void ~AidlTypeSpecifier ()
Defined at line 418 of file ../../third_party/android/platform/system/tools/aidl/aidl_language.h
bool IsFromWithinArray ()
Set for types from ViewAsArrayBase
Defined at line 425 of file ../../third_party/android/platform/system/tools/aidl/aidl_language.h
const string & GetName ()
Returns the full-qualified name of the base type.
int -> int
int[] -> int
List
<String
> -> List
IFoo -> foo.bar.IFoo (if IFoo is in package foo.bar)
Defined at line 432 of file ../../third_party/android/platform/system/tools/aidl/aidl_language.h
const string & GetUnresolvedName ()
Defined at line 452 of file ../../third_party/android/platform/system/tools/aidl/aidl_language.h
const std::vector<std::string> GetSplitName ()
Defined at line 454 of file ../../third_party/android/platform/system/tools/aidl/aidl_language.h
bool IsResolved ()
Defined at line 456 of file ../../third_party/android/platform/system/tools/aidl/aidl_language.h
bool IsArray ()
Defined at line 458 of file ../../third_party/android/platform/system/tools/aidl/aidl_language.h
bool IsDynamicArray ()
Defined at line 459 of file ../../third_party/android/platform/system/tools/aidl/aidl_language.h
bool IsFixedSizeArray ()
Defined at line 462 of file ../../third_party/android/platform/system/tools/aidl/aidl_language.h
const ArrayType & GetArray ()
Defined at line 467 of file ../../third_party/android/platform/system/tools/aidl/aidl_language.h
const AidlNode & AsAidlNode ()
Defined at line 484 of file ../../third_party/android/platform/system/tools/aidl/aidl_language.h
std::string ToString ()
ToString is for dumping AIDL.
Returns string representation of this type specifier including annotations.
This is "annotations type_name type_params? array_marker?".
e.g) "@utf8InCpp String[]";
std::string Signature ()
Signature is for comparing AIDL types.
Returns string representation of this type specifier.
This is "type_name type_params? array_marker?".
e.g.) "String[]" (even if it is annotated with
)
std::vector<int32_t> GetFixedSizeArrayDimensions ()
bool MakeArray (ArrayType array_type)
Accept transitions from
T to T[]
or T to T[N]
or T[N] to T[N][M]
bool Resolve (const AidlTypenames & typenames, const AidlScope * scope)
Resolve the base type name to a fully-qualified name. Return false if the
resolution fails.
bool CheckValid (const AidlTypenames & typenames)
void DispatchVisit (AidlVisitor & v)
Defined at line 488 of file ../../third_party/android/platform/system/tools/aidl/aidl_language.h
bool LanguageSpecificCheckValid (Options::Language lang)
const AidlDefinedType * GetDefinedType ()
void TraverseChildren (std::function<void (const AidlNode &)> traverse)