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

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

public abstract static class JavaParser.TypeDescriptor
extends java.lang.Object

A description of a type, such as a primitive int or the android.app.Activity class


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

Constructor Detail

JavaParser.TypeDescriptor

public JavaParser.TypeDescriptor()
Method Detail

getName

@NonNull
public abstract java.lang.String getName()
Returns the fully qualified name of the type, such as "int" or "android.app.Activity"


getSimpleName

@NonNull
public java.lang.String getSimpleName()
Returns the simple name of this class


getSignature

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


getInternalName

@NonNull
public java.lang.String getInternalName()
Computes the internal class name of the given fully qualified class name. For example, it converts foo.bar.Foo.Bar into foo/bar/Foo$Bar. This should only be called for class types, not primitives.

Returns:
the internal class name

matchesName

public abstract boolean matchesName(@NonNull
                                    java.lang.String name)

isArray

public abstract boolean isArray()
Returns true if the given TypeDescriptor represents an array

Returns:
true if this type represents an array

isPrimitive

public abstract boolean isPrimitive()
Returns true if the given TypeDescriptor represents a primitive

Returns:
true if this type represents a primitive

matchesSignature

public abstract boolean matchesSignature(@NonNull
                                         java.lang.String signature)

getNode

@NonNull
public lombok.ast.TypeReference getNode()

getTypeClass

@Nullable
public abstract JavaParser.ResolvedClass getTypeClass()
If the type is not primitive, returns the class of the type if known


equals

public abstract boolean equals(java.lang.Object o)
Overrides:
equals in class java.lang.Object

toString

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