Beispiel #1
0
  @Override
  public Type getSuperType() {
    val extends_ = type.get().getExtends();

    if (extends_ == null || extends_.isEmpty()) return null;

    return getContext().resolve(extends_.get(0));
  }
Beispiel #2
0
  private com.github.javaparser.ast.type.Type setType(
      Type newType, com.github.javaparser.ast.type.Type currentType) {
    val newType_ = toType(newType);

    if (currentType instanceof ClassOrInterfaceType && newType_ instanceof ClassOrInterfaceType) {
      val annotations = currentType.getAnnotations();
      if (annotations != null && !annotations.isEmpty()) newType_.setAnnotations(annotations);
    }
    return newType_;
  }