Code example for Method

Methods: getGenericParameterTypes, getParameterTypes

0
            } 
        } 
 
        @Override 
        public Type getBaseType() {
            if (declaringMethod.getGenericParameterTypes().length > getPosition()) {
                return declaringMethod.getGenericParameterTypes()[getPosition()];
            } else { 
                return declaringMethod.getParameterTypes()[getPosition()];
            } 
        } 
 
    } 
 
    private static class ConstructorParameter<X> extends Parameter<X> { 
 
        private final Constructor<X> declaringConstructor;
 
        private ConstructorParameter(Constructor<X> declaringConstructor, int position) {
            super(position);
            this.declaringConstructor = declaringConstructor;