Example #1
0
 /**
  * Gets the {@code Type} that represents the superclass of this {@code class}.
  *
  * @return an instance of {@code Type} representing the superclass.
  */
 public Type getGenericSuperclass() {
   GenericSignatureParser parser = new GenericSignatureParser(getClassLoader());
   parser.parseForClass(this, getSignatureAttribute());
   return Types.getType(parser.superclassType);
 }
Example #2
0
 /**
  * Gets the {@link Type}s of the interfaces that this {@code Class} directly implements. If the
  * {@code Class} represents a primitive type or {@code void} then an empty array is returned.
  *
  * @return an array of {@link Type} instances directly implemented by the class represented by
  *     this {@code class}.
  */
 public Type[] getGenericInterfaces() {
   GenericSignatureParser parser = new GenericSignatureParser(getClassLoader());
   parser.parseForClass(this, getSignatureAttribute());
   return Types.getClonedTypeArray(parser.interfaceTypes);
 }