com.fasterxml.classmate.types
Class ResolvedInterfaceType

java.lang.Object
  extended by com.fasterxml.classmate.ResolvedType
      extended by com.fasterxml.classmate.types.ResolvedInterfaceType

public class ResolvedInterfaceType
extends ResolvedType


Field Summary
protected  RawField[] _constantFields
          Interfaces can have static final (constant) fields.
protected  RawMethod[] _memberMethods
          Interface methods are all public and abstract.
protected  ResolvedType[] _superInterfaces
          List of interfaces this type implements; may be empty but never null
 
Fields inherited from class com.fasterxml.classmate.ResolvedType
_erasedType, _typeBindings, NO_CONSTRUCTORS, NO_FIELDS, NO_METHODS, NO_TYPES
 
Constructor Summary
ResolvedInterfaceType(Class<?> erased, TypeBindings bindings, ResolvedType[] superInterfaces)
           
 
Method Summary
 StringBuilder appendBriefDescription(StringBuilder sb)
           
 StringBuilder appendErasedSignature(StringBuilder sb)
           
 StringBuilder appendFullDescription(StringBuilder sb)
           
 StringBuilder appendSignature(StringBuilder sb)
           
 boolean canCreateSubtypes()
          Method that can be used to check if call to TypeResolver.resolveSubtype(ResolvedType, Class) may ever succeed; if false, it will fail with an exception, if true, it may succeed.
 ResolvedType getArrayElementType()
          Method that can be used to access element type of array types; will return null for non-array types, and non-null type for array types.
 List<ResolvedType> getImplementedInterfaces()
          Returns ordered list of interfaces (in declaration order) that this type implements.
 List<RawMethod> getMemberMethods()
           
 ResolvedType getParentClass()
          Returns parent class of this type, if it has one; primitive types and interfaces have no parent class, nor does Object type Object.
 ResolvedType getSelfReferencedType()
          Accessor that must be used to find out actual type in case of "self-reference"; case where type refers recursive to itself (like, T implements Comparable<T>).
 List<RawField> getStaticFields()
           
 boolean isAbstract()
           
 boolean isArray()
          Method that indicates whether this type is an array type.
 boolean isInterface()
           
 boolean isPrimitive()
          Method that indicates whether this type is one of small number of primitive Java types; not including array types of primitive types but just basic primitive types.
 
Methods inherited from class com.fasterxml.classmate.ResolvedType
_appendClassDescription, _appendClassName, _appendClassSignature, _appendErasedClassSignature, _getConstructors, _getFields, _getMethods, canCreateSubtype, equals, findSupertype, getBriefDescription, getConstructors, getErasedSignature, getErasedType, getFullDescription, getMemberFields, getSignature, getStaticMethods, getTypeBindings, getTypeParameters, hashCode, isConcrete, isInstanceOf, toString, typeParametersFor
 
Methods inherited from class java.lang.Object
clone, finalize, getClass, notify, notifyAll, wait, wait, wait
 

Field Detail

_superInterfaces

protected final ResolvedType[] _superInterfaces
List of interfaces this type implements; may be empty but never null


_constantFields

protected RawField[] _constantFields
Interfaces can have static final (constant) fields.


_memberMethods

protected RawMethod[] _memberMethods
Interface methods are all public and abstract.

Constructor Detail

ResolvedInterfaceType

public ResolvedInterfaceType(Class<?> erased,
                             TypeBindings bindings,
                             ResolvedType[] superInterfaces)
Method Detail

canCreateSubtypes

public boolean canCreateSubtypes()
Description copied from class: ResolvedType
Method that can be used to check if call to TypeResolver.resolveSubtype(ResolvedType, Class) may ever succeed; if false, it will fail with an exception, if true, it may succeed.

Specified by:
canCreateSubtypes in class ResolvedType

getParentClass

public ResolvedType getParentClass()
Description copied from class: ResolvedType
Returns parent class of this type, if it has one; primitive types and interfaces have no parent class, nor does Object type Object. Also, placeholders for cyclic (recursive) types return null for this method.

Specified by:
getParentClass in class ResolvedType

getSelfReferencedType

public ResolvedType getSelfReferencedType()
Description copied from class: ResolvedType
Accessor that must be used to find out actual type in case of "self-reference"; case where type refers recursive to itself (like, T implements Comparable<T>). For all other types returns null but for self-references "real" type. Separate accessor is provided to avoid accidental infinite loops.

Specified by:
getSelfReferencedType in class ResolvedType

getImplementedInterfaces

public List<ResolvedType> getImplementedInterfaces()
Description copied from class: ResolvedType
Returns ordered list of interfaces (in declaration order) that this type implements.

Specified by:
getImplementedInterfaces in class ResolvedType
Returns:
List of interfaces this type implements, if any; empty list if none

getArrayElementType

public ResolvedType getArrayElementType()
Description copied from class: ResolvedType
Method that can be used to access element type of array types; will return null for non-array types, and non-null type for array types.

Specified by:
getArrayElementType in class ResolvedType

isInterface

public boolean isInterface()
Specified by:
isInterface in class ResolvedType

isAbstract

public boolean isAbstract()
Specified by:
isAbstract in class ResolvedType

isArray

public boolean isArray()
Description copied from class: ResolvedType
Method that indicates whether this type is an array type.

Specified by:
isArray in class ResolvedType

isPrimitive

public boolean isPrimitive()
Description copied from class: ResolvedType
Method that indicates whether this type is one of small number of primitive Java types; not including array types of primitive types but just basic primitive types.

Specified by:
isPrimitive in class ResolvedType

getStaticFields

public List<RawField> getStaticFields()
Overrides:
getStaticFields in class ResolvedType

getMemberMethods

public List<RawMethod> getMemberMethods()
Overrides:
getMemberMethods in class ResolvedType

appendSignature

public StringBuilder appendSignature(StringBuilder sb)
Specified by:
appendSignature in class ResolvedType

appendErasedSignature

public StringBuilder appendErasedSignature(StringBuilder sb)
Specified by:
appendErasedSignature in class ResolvedType

appendBriefDescription

public StringBuilder appendBriefDescription(StringBuilder sb)
Specified by:
appendBriefDescription in class ResolvedType

appendFullDescription

public StringBuilder appendFullDescription(StringBuilder sb)
Specified by:
appendFullDescription in class ResolvedType


Copyright © 2011 fasterxml.com. All Rights Reserved.