| Modifier and Type | Field and Description |
|---|---|
protected ClassPath |
classPath |
protected boolean |
interfacesFullyResolved |
protected java.lang.String |
type |
protected java.util.Set<java.lang.String> |
unresolvedInterfaces |
protected boolean |
vtableFullyResolved |
| Constructor and Description |
|---|
ClassProto(ClassPath classPath,
java.lang.String type) |
| Modifier and Type | Method and Description |
|---|---|
int |
findMethodIndexInVtable(MethodReference method) |
ClassDef |
getClassDef() |
ClassPath |
getClassPath() |
TypeProto |
getCommonSuperclass(TypeProto other) |
protected java.lang.Iterable<ClassDef> |
getDirectInterfaces()
Gets the interfaces directly implemented by this class, or the interfaces they transitively implement.
|
FieldReference |
getFieldByOffset(int fieldOffset) |
SparseArray<FieldReference> |
getInstanceFields() |
protected java.util.LinkedHashMap<java.lang.String,ClassDef> |
getInterfaces()
Returns the set of interfaces that this class implements as a Map
|
Method |
getMethodByVtableIndex(int vtableIndex) |
java.lang.String |
getSuperclass() |
java.lang.String |
getType() |
protected java.util.Set<java.lang.String> |
getUnresolvedInterfaces() |
java.util.List<Method> |
getVtable() |
boolean |
implementsInterface(java.lang.String iface)
Checks if this class implements the given interface.
|
boolean |
isInterface()
Returns true if this class is an interface.
|
java.lang.String |
toString() |
@Nonnull protected final ClassPath classPath
@Nonnull protected final java.lang.String type
protected boolean vtableFullyResolved
protected boolean interfacesFullyResolved
protected java.util.Set<java.lang.String> unresolvedInterfaces
public ClassProto(@Nonnull
ClassPath classPath,
@Nonnull
java.lang.String type)
public java.lang.String toString()
toString in class java.lang.Object@Nonnull public ClassPath getClassPath()
getClassPath in interface TypeProto@Nonnull public ClassDef getClassDef()
public boolean isInterface()
isInterface in interface TypeProto@Nonnull protected java.util.LinkedHashMap<java.lang.String,ClassDef> getInterfaces()
@Nonnull protected java.util.Set<java.lang.String> getUnresolvedInterfaces()
@Nonnull protected java.lang.Iterable<ClassDef> getDirectInterfaces()
UnresolvedClassException - if interfaces could not be fully resolvedpublic boolean implementsInterface(@Nonnull
java.lang.String iface)
implementsInterface in interface TypeProtoiface - The interface to check forUnresolvedClassException - if the interfaces for this class could not be fully resolved, and the interface
is not one of the interfaces that were successfully resolved@Nullable public java.lang.String getSuperclass()
getSuperclass in interface TypeProto@Nonnull public TypeProto getCommonSuperclass(@Nonnull TypeProto other)
getCommonSuperclass in interface TypeProto@Nullable public FieldReference getFieldByOffset(int fieldOffset)
getFieldByOffset in interface TypeProto@Nullable public Method getMethodByVtableIndex(int vtableIndex)
getMethodByVtableIndex in interface TypeProtopublic int findMethodIndexInVtable(@Nonnull
MethodReference method)
findMethodIndexInVtable in interface TypeProto@Nonnull public SparseArray<FieldReference> getInstanceFields()
@Nonnull public java.util.List<Method> getVtable()