Class Type
java.lang.Object
org.inferred.freebuilder.processor.source.ValueType
org.inferred.freebuilder.processor.source.Type
- All Implemented Interfaces:
Excerpt
- Direct Known Subclasses:
Type.TypeImpl, TypeClass
Representation of a parameterized class or interface type.
Similar to DeclaredType, with a code-generation and test-friendly focus.
-
Nested Class Summary
Nested ClassesModifier and TypeClassDescriptionstatic class(package private) static classNested classes/interfaces inherited from class ValueType
ValueType.FieldReceiver -
Constructor Summary
Constructors -
Method Summary
Modifier and TypeMethodDescriptionvoidaddTo(SourceBuilder source) Returns a source excerpt suitable for constructing an instance of this type, including "new" keyword but excluding brackets.Returns a source excerpt equivalent to the diamond operator for this type.static Typestatic Typefrom(DeclaredType declaredType) abstract QualifiedNameReturns the qualified name of the type class.Returns the simple name of the type class.protected abstract List<?> booleanReturns true if the type class is generic.Returns a source excerpt of a JavaDoc link to this type.javadocMethodLink(String memberName, Type... types) Returns a source excerpt of a JavaDoc link to a method on this type.javadocNoArgMethodLink(String memberName) Returns a source excerpt of a JavaDoc link to a no-args method on this type.Returns a source excerpt of the type parameters of this type, including angle brackets.Returns a new type of the same class, parameterized with wildcards ("?").
-
Constructor Details
-
Type
public Type()
-
-
Method Details
-
from
-
from
-
getQualifiedName
Returns the qualified name of the type class. -
getTypeParameters
-
getSimpleName
Returns the simple name of the type class. -
isParameterized
public boolean isParameterized()Returns true if the type class is generic. -
constructor
Returns a source excerpt suitable for constructing an instance of this type, including "new" keyword but excluding brackets. -
javadocLink
Returns a source excerpt of a JavaDoc link to this type. -
javadocNoArgMethodLink
Returns a source excerpt of a JavaDoc link to a no-args method on this type. -
javadocMethodLink
Returns a source excerpt of a JavaDoc link to a method on this type. -
typeParameters
Returns a source excerpt of the type parameters of this type, including angle brackets. Always an empty string if the type class is not generic.e.g.
<N, C> -
diamondOperator
Returns a source excerpt equivalent to the diamond operator for this type.Always an empty string if the type class is not generic.
-
withWildcards
Returns a new type of the same class, parameterized with wildcards ("?").If the type class is not generic, the returned object will be equal to this one.
-
addTo
-