Package com.strobel.reflection
Class Type<T>
java.lang.Object
com.strobel.reflection.MemberInfo
com.strobel.reflection.Type<T>
- All Implemented Interfaces:
AnnotatedElement,Type
- Direct Known Subclasses:
GenericParameterBuilder,TypeBuilder
- Author:
- Mike Strobel
-
Field Summary
FieldsModifier and TypeFieldDescriptionstatic final Type<?> Deprecated.static final Binderprotected static final Set<BindingFlags> static final charprotected static final ConstructorInfo[]protected static final FieldInfo[]protected static final MemberInfo[]protected static final MethodInfo[]protected static final Object[]protected static final String[]static final Type<?>[]static final MemberFilterstatic final MemberFilterstatic final MemberFilterstatic final MemberFilterstatic final Type<?> Deprecated.UsenullType()instead.static final Missing -
Constructor Summary
Constructors -
Method Summary
Modifier and TypeMethodDescriptionprotected StringBuilderprotected StringBuilder_appendClassName(StringBuilder sb, boolean fullName, boolean dottedName) protected StringBuilderprotected StringBuilder<P,R> R accept(TypeVisitor<P, R> visitor, P parameter) Type<?> asSuperTypeOf(Type<?> type) static Type<?> booleancontainsGenericParameter(Type<?> genericParameter) booleanMemberList<? extends MemberInfo> findMembers(Set<MemberType> memberTypes, Set<BindingFlags> bindingAttr, MemberFilter filter, Object filterCriteria) static Type<?> static Type<?> <A extends Annotation>
AgetAnnotation(Class<A> annotationClass) protected Stringprotected Stringfinal ConstructorInfogetConstructor(Type<?>... parameterTypes) getConstructor(Set<BindingFlags> bindingFlags, CallingConvention callingConvention, Type<?>... parameterTypes) final ConstructorInfogetConstructor(Set<BindingFlags> bindingFlags, Type<?>... parameterTypes) final ConstructorListgetConstructors(Set<BindingFlags> bindingFlags) protected ConstructorListprotected FieldListprotected MethodListprotected TypeListType<?> Object[]String[]final Type<?> Type<?> final FieldInfogetField(String name, Set<BindingFlags> bindingFlags) final FieldListgetFields(Set<BindingFlags> bindingFlags) intMethod that returns full generic signature of the type; suitable as signature for things like ASM package.Type<?> getKind()final MemberList<?> final MemberList<?> getMember(String name, MemberType memberType, MemberType... memberTypes) MemberList<?> getMember(String name, Set<BindingFlags> bindingFlags, Set<MemberType> memberTypes) final MemberList<?> final MemberList<?> getMembers(MemberType memberType, MemberType... memberTypes) final MemberList<?> getMembers(Set<BindingFlags> bindingFlags) final MemberList<?> getMembers(Set<BindingFlags> bindingFlags, MemberType memberType, MemberType... memberTypes) MemberList<?> getMembers(Set<BindingFlags> bindingFlags, Set<MemberType> memberTypes) final MemberList<?> getMembersOfType(Set<MemberType> memberTypes) final MethodInfogetMethod(String name, Set<BindingFlags> bindingFlags, CallingConvention callingConvention, Type<?>... parameterTypes) final MethodInfogetMethod(String name, Set<BindingFlags> bindingFlags, Type<?>... parameterTypes) final MethodListfinal MethodListgetMethods(Set<BindingFlags> bindingFlags) getMethods(Set<BindingFlags> bindingFlags, CallingConvention callingConvention) getName()final Type<?> getNestedType(String fullName) Type<?> getNestedType(String fullName, Set<BindingFlags> bindingFlags) final TypeListgetNestedTypes(Set<BindingFlags> bindingFlags) Type<?> static <T> Type<T> getType(T object) protected TypeBindingsfinal Type<?> protected Type<?> booleanbooleaninthashCode()booleanbooleanimplementsInterface(Type<?> interfaceType) protected voidInvalidate any cached type/member information.final booleanbooleanisAnnotationPresent(Class<? extends Annotation> annotationClass) booleanisArray()booleanisAssignableFrom(Type<?> type) booleanfinal booleanisClass()booleanfinal booleanisEnum()final booleanbooleanisEquivalentTo(Type<?> other) booleanbooleanbooleanbooleanisInstance(Object o) final booleanbooleanbooleanisNested()booleanbooleanbooleanisSubTypeOf(Type<?> type) booleanbooleanbooleanbooleanstatic TypeListstatic TypeListstatic TypeListstatic <T> Type<T[]> makeArrayType(Type<T> elementType) static Type<?> makeCompoundType(Type<?> baseType, TypeList interfaces) static Type<?> makeCompoundType(TypeList bounds) static <T> Type<? extends T> makeExtendsWildcard(Type<T> bound) makeGenericType(Type<?>... typeArguments) makeGenericType(TypeList typeArguments) protected Type<?> makeGenericTypeCore(TypeList typeArguments) static <T> Type<? super T> makeSuperWildcard(Type<T> bound) static com.strobel.reflection.WildcardType<?> newInstance(Object... arguments) static Type<?> nullType()static <T> Type<T> protected static Type<?> substitute(Type<?> type, TypeBindings typeBindings) toString()static com.strobel.reflection.WildcardType<?> Methods inherited from class com.strobel.reflection.MemberInfo
emptyAnnotations, equals, getAnnotationsByType, getBriefDescription, getDeclaredAnnotation, getDeclaredAnnotationsByType, getDeclaringType, getDescription, getErasedDescription, getErasedSignature, getModifiers, getReflectedType, getSignature, getSimpleDescription, isFinal, isNonPublic, isPackagePrivate, isPrivate, isProtected, isPublic, isStaticMethods inherited from class java.lang.Object
clone, finalize, getClass, notify, notifyAll, wait, wait, waitMethods inherited from interface java.lang.reflect.Type
getTypeName
-
Field Details
-
DefaultBinder
-
Delimiter
public static final char Delimiter- See Also:
-
Value
-
EmptyTypes
-
Bottom
Deprecated.UsebottomType()instead. -
NullType
Deprecated.UsenullType()instead. -
EmptyObjects
-
EmptyStrings
-
EmptyMethods
-
EmptyConstructors
-
EmptyFields
-
EmptyMembers
-
DefaultLookup
-
FilterNameIgnoreCase
-
FilterName
-
FilterRawMember
-
FilterMethodOverride
-
-
Constructor Details
-
Type
protected Type()
-
-
Method Details
-
bottomType
-
nullType
-
unboundedWildcard
public static com.strobel.reflection.WildcardType<?> unboundedWildcard() -
getMemberType
- Specified by:
getMemberTypein classMemberInfo
-
isNested
public boolean isNested() -
isLocalClass
public boolean isLocalClass() -
isVisible
public boolean isVisible() -
isClass
public final boolean isClass() -
isInterface
public final boolean isInterface() -
isEnum
public final boolean isEnum() -
isAbstract
public final boolean isAbstract() -
isArray
public boolean isArray() -
isGenericType
public boolean isGenericType() -
isGenericTypeDefinition
public boolean isGenericTypeDefinition() -
isRawType
public boolean isRawType() -
isGenericParameter
public boolean isGenericParameter() -
isPrimitive
public boolean isPrimitive() -
hasElementType
public boolean hasElementType() -
getKind
-
getBaseType
-
getInterfaces
-
getExplicitInterfaces
-
getErasedClass
-
newInstance
-
getDeclaringMethod
-
getUnderlyingType
-
getUnderlyingTypeCore
-
getElementType
-
getGenericParameterPosition
public int getGenericParameterPosition() -
getTypeBindings
-
getTypeArguments
-
getGenericTypeParameters
-
getGenericTypeDefinition
-
containsGenericParameters
public boolean containsGenericParameters() -
containsGenericParameter
-
isBoundedType
public boolean isBoundedType() -
isUnbounded
public boolean isUnbounded() -
hasExtendsBound
public boolean hasExtendsBound() -
hasSuperBound
public boolean hasSuperBound() -
getExtendsBound
-
getSuperBound
-
isEquivalentTo
- Overrides:
isEquivalentToin classMemberInfo
-
isEquivalentTo
-
isSubTypeOf
-
isInstance
-
implementsInterface
-
isAssignableFrom
-
getPackage
-
isCompoundType
public boolean isCompoundType() -
isWildcardType
public boolean isWildcardType() -
isSynthetic
public boolean isSynthetic() -
accept
-
getAnnotation
- Specified by:
getAnnotationin interfaceAnnotatedElement- Overrides:
getAnnotationin classMemberInfo
-
getAnnotations
- Specified by:
getAnnotationsin interfaceAnnotatedElement- Overrides:
getAnnotationsin classMemberInfo
-
getDeclaredAnnotations
- Specified by:
getDeclaredAnnotationsin interfaceAnnotatedElement- Overrides:
getDeclaredAnnotationsin classMemberInfo
-
isAnnotationPresent
- Specified by:
isAnnotationPresentin interfaceAnnotatedElement- Overrides:
isAnnotationPresentin classMemberInfo
-
getMember
-
getMember
-
getMember
public MemberList<?> getMember(String name, Set<BindingFlags> bindingFlags, Set<MemberType> memberTypes) -
getField
-
getField
-
getMethod
-
getMethod
public final MethodInfo getMethod(String name, Set<BindingFlags> bindingFlags, Type<?>... parameterTypes) -
getMethod
public MethodInfo getMethod(String name, Set<BindingFlags> bindingFlags, CallingConvention callingConvention, Type<?>... parameterTypes) -
getConstructor
-
getConstructor
public final ConstructorInfo getConstructor(Set<BindingFlags> bindingFlags, Type<?>... parameterTypes) -
getConstructor
public ConstructorInfo getConstructor(Set<BindingFlags> bindingFlags, CallingConvention callingConvention, Type<?>... parameterTypes) -
getMembers
-
getMembersOfType
-
getMembers
-
getMembers
-
getMembers
public final MemberList<?> getMembers(Set<BindingFlags> bindingFlags, MemberType memberType, MemberType... memberTypes) -
getMembers
-
findMembers
public MemberList<? extends MemberInfo> findMembers(Set<MemberType> memberTypes, Set<BindingFlags> bindingAttr, MemberFilter filter, Object filterCriteria) -
getFields
-
getFields
-
getMethods
-
getMethods
-
getMethods
-
getConstructors
-
getConstructors
-
getNestedTypes
-
getNestedTypes
-
getNestedType
-
getNestedType
-
getEnumConstants
-
getEnumNames
-
hashCode
public int hashCode()- Overrides:
hashCodein classMemberInfo
-
makeArrayType
-
createArrayType
-
makeGenericType
-
makeGenericType
-
getErasedType
-
makeGenericTypeCore
-
substitute
-
asSuperTypeOf
-
toString
- Overrides:
toStringin classMemberInfo
-
getName
- Specified by:
getNamein classMemberInfo
-
getClassFullName
-
getClassSimpleName
-
getShortName
-
getFullName
-
getInternalName
-
getGenericSignature
Method that returns full generic signature of the type; suitable as signature for things like ASM package. -
appendBriefDescription
- Specified by:
appendBriefDescriptionin classMemberInfo
-
appendSimpleDescription
- Specified by:
appendSimpleDescriptionin classMemberInfo
-
appendErasedDescription
- Specified by:
appendErasedDescriptionin classMemberInfo
-
appendDescription
- Specified by:
appendDescriptionin classMemberInfo
-
appendSignature
- Specified by:
appendSignaturein classMemberInfo
-
appendGenericSignature
- Overrides:
appendGenericSignaturein classMemberInfo
-
invalidateCaches
protected void invalidateCaches()Description copied from class:MemberInfoInvalidate any cached type/member information. This is not guaranteed to be thread-safe, should only be called when a partially constructed type/member definition changes (e.g., a TypeBuilder, MethodBuilder, etc.).- Overrides:
invalidateCachesin classMemberInfo
-
appendErasedSignature
- Specified by:
appendErasedSignaturein classMemberInfo
-
_appendClassSignature
-
_appendErasedClassSignature
-
_appendClassDescription
-
_appendClassName
-
of
-
forName
-
forName
-
getType
-
makeExtendsWildcard
-
makeSuperWildcard
-
makeWildcard
public static com.strobel.reflection.WildcardType<?> makeWildcard() -
makeArrayType
-
makeCompoundType
-
makeCompoundType
-
list
-
list
-
list
-
getDeclaredConstructors
-
getDeclaredMethods
-
getDeclaredFields
-
getDeclaredTypes
-
bottomType()instead.