Interface HasTypeParameters<OWNER extends HasDescription>

All Known Implementing Classes:
JavaClass, JavaCodeUnit, JavaConstructor, JavaMethod, JavaStaticInitializer

@PublicAPI(usage=ACCESS) public interface HasTypeParameters<OWNER extends HasDescription>
  • Method Details

    • getTypeParameters

      @PublicAPI(usage=ACCESS) List<? extends JavaTypeVariable<? extends OWNER>> getTypeParameters()
      Returns:
      the type parameters of this object, e.g. for any generic method
      <A, B> B someMethod(A a) {..}
      this would return the JavaTypeVariables [A, B].
      If this object is non-generic, e.g. a method
      void someMethod() {..}
      an empty list will be returned.