Class ParameterType
java.lang.Object
xyz.janboerman.scalaloader.configurationserializable.runtime.ParameterType
- Direct Known Subclasses:
ArrayParameterType
,ParameterizedParameterType
Represents a plain type.
When registering a Codec, this type should correspond to the LIVE type of a
Codec
- See Also:
-
Method Summary
Modifier and TypeMethodDescriptionboolean
static ParameterType
from
(AnnotatedType type) Construct a ParameterType from an AnnotatedTypestatic ParameterType
Construct a ParameterType from a Parameter.static ParameterType
Construct a ParameterType from aClass
.static ParameterType
from
(Set<? extends Annotation> annotations, Type type) Construct the ParameterType that includes annotation information.<A extends Annotation>
AgetAnnotation
(Class<A> annotationClass) Get the annotation of a given annotation type.Set
<? extends Annotation> Get the annotations present with this parameter type.Class
<?> Get the raw typeint
hashCode()
toString()
-
Method Details
-
getRawType
Get the raw type- Returns:
- the raw type
-
getAnnotations
Get the annotations present with this parameter type.- Returns:
- the annotations
-
getAnnotation
Get the annotation of a given annotation type.- Type Parameters:
A
- the annotation type- Parameters:
annotationClass
- the annotation type- Returns:
- the annotation, or null if this type is not annotated with an annotation of the given annotation type
-
from
Construct the ParameterType that includes annotation information.- Parameters:
annotations
- the annotationstype
- theClass
- Returns:
- a new ParameterType
-
from
Construct a ParameterType from aClass
.- Parameters:
type
- the type in terms of Java's reflection api.- Returns:
- a new ParameterType
-
from
Construct a ParameterType from a Parameter.- Parameters:
parameter
- the type in terms of Java's reflection api.- Returns:
- a new ParameterType
-
from
Construct a ParameterType from an AnnotatedType- Parameters:
type
- the type in terms of Java's reflection api.- Returns:
- a new ParameterType
-
toString
-
equals
-
hashCode
public int hashCode()
-