@Component(value="reflectionUtils") public class ReflectionUtils extends Object
Constructor and Description |
---|
ReflectionUtils() |
Modifier and Type | Method and Description |
---|---|
Class<?> |
getDeclaringClass(AnnotatedElement annotatedElement)
Returns the
Class which contains the given AnnotatedElement . |
Method |
getDeclaringMethod(AnnotatedElement annotatedElement)
Returns the
Method which contains the given AnnotatedElement . |
boolean |
hasSignature(Method method,
String expectedName,
Class<?>... expectedParameterTypes)
Returns true if the given method has the expected name and parameter types.
|
public Class<?> getDeclaringClass(AnnotatedElement annotatedElement)
Class
which contains the given AnnotatedElement
. If the given AnnotatedElement
is a
Class
, it is returned.annotatedElement
- the annotated element which's containing Class
should be determinedpublic Method getDeclaringMethod(AnnotatedElement annotatedElement)
Method
which contains the given AnnotatedElement
. If the given AnnotatedElement
is a
Method
, it is returned.annotatedElement
- the annotated element which's containing Method
should be determinedpublic boolean hasSignature(Method method, String expectedName, Class<?>... expectedParameterTypes)
method
- the method to checkexpectedName
- the expected method nameexpectedParameterTypes
- the expected parameter typesCopyright © 2018 b+m Informatik AG. All rights reserved.