Class clazz = parameter.getParameterType();
Here I have clazz, which i'm certain that this is Optional<T> type class. The problem is how can I get this T? I want to know if this is String or Long or Integer or something in the runtime.
ok, I think I didn't put it clearly. I got a method parameters by reflection,
public String abc(Optional<String> ttt, Optional<Integer> bbb) {
    return;
}
So now I have the class of ttt, and bbb, and i'm sure that this is Optional<T>.class, but can I get which T elasctly that is.
 
    