Skip to content
Permalink
Browse files
8254979: Class.getSimpleName() returns non-empty for lambda and method
Reviewed-by: rriggs, mchung
  • Loading branch information
jddarcy committed Mar 17, 2021
1 parent 83a49ef commit 26234b53335c0e45551c4e49b5a5f4af1e0f68a5
Showing 1 changed file with 9 additions and 7 deletions.
@@ -779,10 +779,9 @@ public boolean isAnnotation() {
}

/**
* Returns {@code true} if and only if this class has the synthetic modifier
* bit set.
*{@return {@code true} if and only if this class has the synthetic modifier
* bit set}
*
* @return {@code true} if and only if this class has the synthetic modifier bit set
* @jls 13.1 The Form of a Binary
* @jvms 4.1 The {@code ClassFile} Structure
* @since 1.5
@@ -1620,12 +1619,15 @@ public Class<?> getEnclosingClass() throws SecurityException {

/**
* Returns the simple name of the underlying class as given in the
* source code. Returns an empty string if the underlying class is
* anonymous.
* source code. An empty string is returned if the underlying class is
* {@linkplain #isAnonymousClass() anonymous}.
* A {@linkplain #isSynthetic() synthetic class}, one not present
* in source code, can have a non-empty name including special
* characters, such as "{@code $}".
*
* <p>The simple name of an array is the simple name of the
* <p>The simple name of an {@linkplain isArray() array class} is the simple name of the
* component type with "[]" appended. In particular the simple
* name of an array whose component type is anonymous is "[]".
* name of an array class whose component type is anonymous is "[]".
*
* @return the simple name of the underlying class
* @since 1.5

0 comments on commit 26234b5

Please sign in to comment.