Ejemplo n.º 1
0
 public void replaceDeclaredTypeParameters(List<JvmTypeParameter> typeParameters) {
   List<JvmTypeParameter> list = basicGetDeclardTypeParameters();
   if (list != null) {
     throw new IllegalStateException(
         "Cannot replace declared type parameters if there are already type parameters in this StackedResolvedTypes");
   }
   super.addDeclaredTypeParameters(typeParameters);
 }
Ejemplo n.º 2
0
 @Override
 public void addDeclaredTypeParameters(List<JvmTypeParameter> typeParameters) {
   if (typeParameters.isEmpty()) return;
   List<JvmTypeParameter> list = basicGetDeclardTypeParameters();
   if (list == null) {
     super.addDeclaredTypeParameters(parent.getDeclaredTypeParameters());
     getDeclaredTypeParameters().addAll(typeParameters);
   } else {
     list.addAll(typeParameters);
   }
 }