Package io.github.fastclasspathscanner
Class MethodParameterInfo
- java.lang.Object
-
- io.github.fastclasspathscanner.MethodParameterInfo
-
public class MethodParameterInfo extends Object
Information on the parameters of a method.- Author:
- lukehutch
-
-
Constructor Summary
Constructors Constructor Description MethodParameterInfo(AnnotationInfo[] annotationInfo, int modifiers, TypeSignature typeDescriptor, TypeSignature typeSignature, String name)
-
Method Summary
All Methods Instance Methods Concrete Methods Modifier and Type Method Description AnnotationInfo[]
getAnnotationInfo()
Method parameter annotation info (or null if no annotations).int
getModifiers()
Method parameter modifiers.String
getModifiersStr()
Get the method parameter modifiers as a String, e.g.String
getName()
Method parameter name.TypeSignature
getTypeDescriptor()
Method parameter type descriptor.TypeSignature
getTypeSignature()
Method parameter type signature, possibly including generic type information (or null if no type signature information available for this parameter).TypeSignature
getTypeSignatureOrTypeDescriptor()
Method parameter type signature, or if not available, method type descriptor.void
setScanResult(ScanResult scanResult)
String
toString()
-
-
-
Constructor Detail
-
MethodParameterInfo
public MethodParameterInfo(AnnotationInfo[] annotationInfo, int modifiers, TypeSignature typeDescriptor, TypeSignature typeSignature, String name)
- Parameters:
annotationInfo
-AnnotationInfo
for any annotations on this method parameter.modifiers
- The method parameter modifiers.typeDescriptor
- The method parameter type descriptor.typeSignature
- The method parameter type signature.name
- The method parameter name.
-
-
Method Detail
-
setScanResult
public void setScanResult(ScanResult scanResult)
-
getName
public String getName()
Method parameter name. May be null, for unnamed parameters (e.g. synthetic parameters), or if compiled for JDK version lower than 8, or if compiled for JDK version 8+ but without the commandline switch `-parameters`.- Returns:
- The method parameter name.
-
getModifiers
public int getModifiers()
Method parameter modifiers. May be zero, if no modifier bits set, or if compiled for JDK version lower than 8, or if compiled for JDK version 8+ but without the commandline switch `-parameters`.- Returns:
- The method parameter modifiers.
-
getModifiersStr
public String getModifiersStr()
Get the method parameter modifiers as a String, e.g. "final". For the modifier bits, callgetModifiers()
.- Returns:
- The modifiers for the method parameter, as a String.
-
getTypeSignature
public TypeSignature getTypeSignature()
Method parameter type signature, possibly including generic type information (or null if no type signature information available for this parameter).- Returns:
- The method type signature, if available, else null.
-
getTypeDescriptor
public TypeSignature getTypeDescriptor()
Method parameter type descriptor.- Returns:
- The method type descriptor.
-
getTypeSignatureOrTypeDescriptor
public TypeSignature getTypeSignatureOrTypeDescriptor()
Method parameter type signature, or if not available, method type descriptor.- Returns:
- The method type signature, if present, otherwise the method type descriptor.
-
getAnnotationInfo
public AnnotationInfo[] getAnnotationInfo()
Method parameter annotation info (or null if no annotations).- Returns:
AnnotationInfo
for any annotations on this method parameter.
-
-