/** * {@inheritDoc} */ public boolean represents(java.lang.reflect.Type type) { return equals(Sort.describe(type)); } }
/** * {@inheritDoc} */ @CachedReturnPlugin.Enhance("resolved") protected Generic resolve() { java.lang.reflect.Type superClass = type.getGenericSuperclass(); return superClass == null ? Generic.UNDEFINED : Sort.describe(superClass, getAnnotationReader()); }
@Override @CachedReturnPlugin.Enhance("resolved") protected Generic resolve() { return Sort.describe(method.getGenericReturnType(), getAnnotationReader()); }
/** * {@inheritDoc} */ public Composable setsValue(StackManipulation stackManipulation, Type type) { return setsValue(stackManipulation, TypeDescription.Generic.Sort.describe(type)); }
@Override @CachedReturnPlugin.Enhance("resolved") protected Generic resolve() { return Sort.describe(field.getGenericType(), getAnnotationReader()); }
/** * {@inheritDoc} */ public boolean represents(java.lang.reflect.Type type) { return equals(Sort.describe(type)); }
/** * Matches any Java bean getter method which returns the given type. * * @param type The required getter type. * @param <T> The type of the matched object. * @return A matcher that matches a getter method with the given type. */ public static <T extends MethodDescription> ElementMatcher.Junction<T> isGenericGetter(Type type) { return isGenericGetter(TypeDefinition.Sort.describe(type)); }
/** * {@inheritDoc} */ public FieldDefinition.Optional.Valuable<S> defineField(String name, Type type, int modifiers) { return defineField(name, TypeDefinition.Sort.describe(type), modifiers); }
/** * {@inheritDoc} */ public Simple.Annotatable<W> withParameter(Type type) { return withParameter(TypeDefinition.Sort.describe(type)); } }
@Override @CachedReturnPlugin.Enhance("resolved") protected TypeDescription.Generic resolve() { java.lang.reflect.Type[] type = method.getGenericExceptionTypes(); return erasure.length == type.length ? Sort.describe(type[index], getAnnotationReader()) : asRawType(); }
@Override @CachedReturnPlugin.Enhance("resolved") protected TypeDescription.Generic resolve() { java.lang.reflect.Type[] type = this.type.getGenericInterfaces(); return erasure.length == type.length ? Sort.describe(type[index], getAnnotationReader()) : asRawType(); }
@Override @CachedReturnPlugin.Enhance("resolved") protected Generic resolve() { java.lang.reflect.Type[] type = method.getGenericParameterTypes(); return erasure.length == type.length ? Sort.describe(type[index], getAnnotationReader()) : OfNonGenericType.ForLoadedType.of(erasure[index]); }
/** * {@inheritDoc} */ public Generic get(int index) { return Sort.describe(upperBound[index], annotationReader.ofWildcardUpperBoundType(index)); }
/** * Matches a {@link ByteCodeElement} for being declared by a given generic {@link Type}. * * @param type The type that is expected to declare the matched byte code element. * @param <T> The type of the matched object. * @return A matcher for byte code elements being declared by the given {@code type}. */ public static <T extends ByteCodeElement> ElementMatcher.Junction<T> isDeclaredByGeneric(Type type) { return isDeclaredByGeneric(TypeDefinition.Sort.describe(type)); }
/** * Binds the supplied annotation to the annotation's property of the specified name. * * @param type The type of the annotation being bound. * @param stackManipulation The stack manipulation loading the bound value. * @param targetType The type of the loaded value. * @param <T> The annotation type. * @return A new builder for an advice that considers the supplied annotation during binding. */ public <T extends Annotation> WithCustomMapping bind(Class<T> type, StackManipulation stackManipulation, java.lang.reflect.Type targetType) { return bind(type, stackManipulation, TypeDefinition.Sort.describe(targetType)); }
/** * Creates an argument loader that loads a stack manipulation as an argument. * * @param stackManipulation The stack manipulation to load. * @param type The type of the resulting value. */ public ForStackManipulation(StackManipulation stackManipulation, Type type) { this(stackManipulation, TypeDescription.Generic.Sort.describe(type)); }
/** * Describes a loaded generic type as a {@link TypeDescription.Generic}. * * @param type The type to describe. * @return A description of the provided generic type. */ public static TypeDescription.Generic describe(Type type) { return describe(type, TypeDescription.Generic.AnnotationReader.NoOp.INSTANCE); }
@Override @CachedReturnPlugin.Enhance("delegate") protected Generic resolve() { java.lang.reflect.Type[] type = constructor.getGenericParameterTypes(); return erasure.length == type.length ? Sort.describe(type[index], getAnnotationReader()) : OfNonGenericType.ForLoadedType.of(erasure[index]); }
/** * {@inheritDoc} */ public ParameterDefinition.Annotatable<V> withParameter(Type type, String name, int modifiers) { return withParameter(TypeDefinition.Sort.describe(type), name, modifiers); }
/** * {@inheritDoc} */ public Simple.Annotatable<W> withParameter(Type type) { return withParameter(TypeDefinition.Sort.describe(type)); }