< prev index next >

src/java.base/share/classes/java/lang/reflect/Constructor.java

Print this page
@@ -123,10 +123,11 @@
                  int modifiers,
                  int slot,
                  String signature,
                  byte[] annotations,
                  byte[] parameterAnnotations) {
+         assert declaringClass.isPrimaryType();
          this.clazz = declaringClass;
          this.parameterTypes = parameterTypes;
          this.exceptionTypes = checkedExceptions;
          this.modifiers = modifiers;
          this.slot = slot;

@@ -361,17 +362,17 @@
                                exceptionTypes);
      }
  
      @Override
      void specificToStringHeader(StringBuilder sb) {
-         sb.append(getDeclaringClass().getTypeName());
+         sb.append(getDeclaringClassTypeName());
      }
  
      @Override
      String toShortString() {
          StringBuilder sb = new StringBuilder("constructor ");
-         sb.append(getDeclaringClass().getTypeName());
+         sb.append(getDeclaringClassTypeName());
          sb.append('(');
          StringJoiner sj = new StringJoiner(",");
          for (Class<?> parameterType : getParameterTypes()) {
              sj.add(parameterType.getTypeName());
          }
< prev index next >