Class TypePool.AbstractBase.ArrayTypeResolution
java.lang.Object
net.bytebuddy.pool.TypePool.AbstractBase.ArrayTypeResolution
- All Implemented Interfaces:
TypePool.Resolution
- Enclosing class:
TypePool.AbstractBase
@Enhance
protected static class TypePool.AbstractBase.ArrayTypeResolution
extends Object
implements TypePool.Resolution
A resolution for a type that, if resolved, represents an array type.
-
Nested Class Summary
Nested classes/interfaces inherited from interface TypePool.Resolution
TypePool.Resolution.Illegal, TypePool.Resolution.NoSuchTypeException, TypePool.Resolution.Simple -
Field Summary
FieldsModifier and TypeFieldDescriptionprivate final intThe arity of the represented array.private final TypePool.ResolutionThe underlying resolution that is represented by this instance. -
Constructor Summary
ConstructorsModifierConstructorDescriptionprotectedArrayTypeResolution(TypePool.Resolution resolution, int arity) Creates a wrapper for another resolution that, if resolved, represents an array type. -
Method Summary
Modifier and TypeMethodDescriptionbooleanDetermines if this resolution represents a fully-resolvedTypeDescription.protected static TypePool.Resolutionof(TypePool.Resolution resolution, int arity) Creates a wrapper for another resolution that, if resolved, represents an array type.resolve()Resolves this resolution to aTypeDescription.
-
Field Details
-
resolution
The underlying resolution that is represented by this instance. -
arity
private final int arityThe arity of the represented array.
-
-
Constructor Details
-
ArrayTypeResolution
Creates a wrapper for another resolution that, if resolved, represents an array type.- Parameters:
resolution- The underlying resolution that is represented by this instance.arity- The arity of the represented array.
-
-
Method Details
-
of
Creates a wrapper for another resolution that, if resolved, represents an array type. The wrapper is only created if the arity is not zero. If the arity is zero, the given resolution is simply returned instead.- Parameters:
resolution- The underlying resolution that is represented by this instance.arity- The arity of the represented array.- Returns:
- A wrapper for another resolution that, if resolved, represents an array type or the given resolution if the given arity is zero.
-
isResolved
public boolean isResolved()Determines if this resolution represents a fully-resolvedTypeDescription.- Specified by:
isResolvedin interfaceTypePool.Resolution- Returns:
trueif the queried type could be resolved.
-
resolve
Resolves this resolution to aTypeDescription. If this resolution is unresolved, this method throws an exception either upon invoking this method or upon invoking at least one method of the returned type description.- Specified by:
resolvein interfaceTypePool.Resolution- Returns:
- The type description that is represented by this resolution.
-