Class ProcessingUtils
java.lang.Object
com.github.chhorz.openapi.common.util.ProcessingUtils
-
Constructor Summary
-
Method Summary
Modifier and TypeMethodDescriptioncreateTypeMirrorFromString
(String typeString) boolean
doesTypeDiffer
(TypeMirror typeMirrorOne, TypeMirror typeMirrorTwo) Check if both types are not equal.static String
getShortName
(TypeMirror typeMirror) boolean
isAssignableTo
(TypeMirror typeMirror, Class<?> clazz) Checks if the given type is assignable to the type of a given class.boolean
isInterface
(TypeMirror typeMirror) Checks if the given type belongs to an interface element.boolean
isSameType
(TypeMirror typeMirror, Class<?> clazz) Checks if the given type is of a certain class.boolean
isTypeInPackage
(TypeMirror typeMirror, PackageElement packageElement) Checks if the given type resides within the given package.populateTypeParameterMap
(TypeElement typeElement, Map<TypeMirror, Map<TypeParameterElement, TypeMirror>> typeParameterMap) removeEnclosingType
(TypeMirror originalReturnType, Class<?> removableClass)
-
Constructor Details
-
ProcessingUtils
-
-
Method Details
-
doesTypeDiffer
Check if both types are not equal. The check consists ofTypes.isSameType(TypeMirror, TypeMirror)
and a string comparison- Parameters:
typeMirrorOne
- the first typetypeMirrorTwo
- the second type- Returns:
true
if both types are equal
-
isSameType
Checks if the given type is of a certain class.- Parameters:
typeMirror
- the type that should be checkedclazz
- the requested class- Returns:
true
if the given type is of the given class
-
isAssignableTo
Checks if the given type is assignable to the type of a given class.- Parameters:
typeMirror
- the type that should be checkedclazz
- the requested class- Returns:
true
if the type is assignable to the class type
-
isTypeInPackage
Checks if the given type resides within the given package.- Parameters:
typeMirror
- the requested typepackageElement
- the given package- Returns:
true
if the type resides in the given package
-
isInterface
Checks if the given type belongs to an interface element.- Parameters:
typeMirror
- the requested type- Returns:
true
if the type is an interface
-
removeEnclosingType
-
createTypeMirrorFromString
-
getShortName
-
populateTypeParameterMap
public Map<TypeMirror,Map<TypeParameterElement, populateTypeParameterMapTypeMirror>> (TypeElement typeElement, Map<TypeMirror, Map<TypeParameterElement, TypeMirror>> typeParameterMap)
-