public class AnnotatedJavaType extends Object
JavaType with zero or more annotations.| Constructor and Description |
|---|
AnnotatedJavaType(org.springframework.roo.model.JavaType javaType,
AnnotationMetadata... annotations)
Constructor that accepts a vararg array of annotations
|
AnnotatedJavaType(org.springframework.roo.model.JavaType javaType,
Collection<AnnotationMetadata> annotations)
Constructor that accepts an optional list of annotations
|
| Modifier and Type | Method and Description |
|---|---|
static org.springframework.roo.model.JavaType |
convertFromAnnotatedJavaType(AnnotatedJavaType annotatedJavaType)
Converts a non-null
AnnotatedJavaType into an equivalent
JavaType. |
static List<org.springframework.roo.model.JavaType> |
convertFromAnnotatedJavaTypes(List<AnnotatedJavaType> annotatedJavaTypes)
|
static AnnotatedJavaType |
convertFromJavaType(org.springframework.roo.model.JavaType javaType)
Converts a
JavaType into an equivalent AnnotatedJavaType. |
static List<AnnotatedJavaType> |
convertFromJavaTypes(Iterable<? extends org.springframework.roo.model.JavaType> javaTypes)
|
static List<AnnotatedJavaType> |
convertFromJavaTypes(org.springframework.roo.model.JavaType... javaTypes)
|
List<AnnotationMetadata> |
getAnnotations()
Returns the annotations on this type
|
org.springframework.roo.model.JavaType |
getJavaType() |
boolean |
isVarArgs() |
void |
setVarArgs(boolean varArgs) |
String |
toString() |
public AnnotatedJavaType(org.springframework.roo.model.JavaType javaType,
AnnotationMetadata... annotations)
javaType - the type (required)annotations - can be nonepublic AnnotatedJavaType(org.springframework.roo.model.JavaType javaType,
Collection<AnnotationMetadata> annotations)
javaType - the type (required)annotations - any annotations for the type (defensively copied,
null is acceptable)public static org.springframework.roo.model.JavaType convertFromAnnotatedJavaType(AnnotatedJavaType annotatedJavaType)
AnnotatedJavaType into an equivalent
JavaType. Note the annotation metadata will be discarded, as it
cannot be stored inside a JavaType.annotatedJavaType - to convert (required)AnnotatedJavaType, but without any actual
annotations (never returns null)public static List<org.springframework.roo.model.JavaType> convertFromAnnotatedJavaTypes(List<AnnotatedJavaType> annotatedJavaTypes)
List of AnnotatedJavaTypes into a
List of equivalent JavaTypes. Note the annotation
metadata will be discarded, as it cannot be stored inside a
JavaType.annotatedJavaTypes - to convert (required)AnnotatedJavaTypes, but without any actual
annotations (never returns null)public static AnnotatedJavaType convertFromJavaType(org.springframework.roo.model.JavaType javaType)
JavaType into an equivalent AnnotatedJavaType.
Note that each returned AnnotatedJavaTypewill have no annotation
metadata, as the input JavaType cannot store any such metadata.javaType - to convert (required)AnnotatedJavaType (never returns null)public static List<AnnotatedJavaType> convertFromJavaTypes(Iterable<? extends org.springframework.roo.model.JavaType> javaTypes)
JavaTypes into a List of
equivalent AnnotatedJavaTypes. Note that each returned
AnnotatedJavaType will have no annotation metadata, as the input
JavaTypes cannot store any such metadata.javaTypes - to convert (can be null for none)AnnotatedJavaTypes (never returns null)public static List<AnnotatedJavaType> convertFromJavaTypes(org.springframework.roo.model.JavaType... javaTypes)
JavaTypes into a List of
equivalent AnnotatedJavaTypes. Note that each returned
AnnotatedJavaType will have no annotation metadata, as the input
JavaTypes cannot store any such metadata.javaTypes - to convertAnnotatedJavaTypes (never returns null)public List<AnnotationMetadata> getAnnotations()
null, but may be empty)public org.springframework.roo.model.JavaType getJavaType()
public boolean isVarArgs()
public void setVarArgs(boolean varArgs)
Copyright © 2009–2017. All rights reserved.