com.android.tools.lint.client.api
Class JavaParser.DefaultTypeDescriptor

java.lang.Object
  extended by com.android.tools.lint.client.api.JavaParser.TypeDescriptor
      extended by com.android.tools.lint.client.api.JavaParser.DefaultTypeDescriptor
Enclosing class:
JavaParser

public static class JavaParser.DefaultTypeDescriptor
extends JavaParser.TypeDescriptor

Convenience implementation of JavaParser.TypeDescriptor


Constructor Summary
JavaParser.DefaultTypeDescriptor(java.lang.String name)
           
 
Method Summary
 boolean equals(java.lang.Object o)
           
 java.lang.String getName()
          Returns the fully qualified name of the type, such as "int" or "android.app.Activity"
 java.lang.String getSignature()
          Returns the full signature of the type, which is normally the same as JavaParser.TypeDescriptor.getName() but for arrays can include []'s, for generic methods can include generics parameters etc
 JavaParser.ResolvedClass getTypeClass()
          If the type is not primitive, returns the class of the type if known
 int hashCode()
           
 boolean isArray()
          Returns true if the given TypeDescriptor represents an array
 boolean isPrimitive()
          Returns true if the given TypeDescriptor represents a primitive
 boolean matchesName(java.lang.String name)
           
 boolean matchesSignature(java.lang.String signature)
           
 java.lang.String toString()
           
 
Methods inherited from class com.android.tools.lint.client.api.JavaParser.TypeDescriptor
getInternalName, getNode, getSimpleName
 
Methods inherited from class java.lang.Object
clone, finalize, getClass, notify, notifyAll, wait, wait, wait
 

Constructor Detail

JavaParser.DefaultTypeDescriptor

public JavaParser.DefaultTypeDescriptor(java.lang.String name)
Method Detail

getName

@NonNull
public java.lang.String getName()
Description copied from class: JavaParser.TypeDescriptor
Returns the fully qualified name of the type, such as "int" or "android.app.Activity"

Specified by:
getName in class JavaParser.TypeDescriptor

getSignature

@NonNull
public java.lang.String getSignature()
Description copied from class: JavaParser.TypeDescriptor
Returns the full signature of the type, which is normally the same as JavaParser.TypeDescriptor.getName() but for arrays can include []'s, for generic methods can include generics parameters etc

Specified by:
getSignature in class JavaParser.TypeDescriptor

matchesName

public boolean matchesName(@NonNull
                           java.lang.String name)
Specified by:
matchesName in class JavaParser.TypeDescriptor

isArray

public boolean isArray()
Description copied from class: JavaParser.TypeDescriptor
Returns true if the given TypeDescriptor represents an array

Specified by:
isArray in class JavaParser.TypeDescriptor
Returns:
true if this type represents an array

isPrimitive

public boolean isPrimitive()
Description copied from class: JavaParser.TypeDescriptor
Returns true if the given TypeDescriptor represents a primitive

Specified by:
isPrimitive in class JavaParser.TypeDescriptor
Returns:
true if this type represents a primitive

matchesSignature

public boolean matchesSignature(@NonNull
                                java.lang.String signature)
Specified by:
matchesSignature in class JavaParser.TypeDescriptor

toString

public java.lang.String toString()
Overrides:
toString in class JavaParser.TypeDescriptor

getTypeClass

@Nullable
public JavaParser.ResolvedClass getTypeClass()
Description copied from class: JavaParser.TypeDescriptor
If the type is not primitive, returns the class of the type if known

Specified by:
getTypeClass in class JavaParser.TypeDescriptor

equals

public boolean equals(java.lang.Object o)
Specified by:
equals in class JavaParser.TypeDescriptor

hashCode

public int hashCode()
Overrides:
hashCode in class java.lang.Object