< prev index next >
src/java.base/share/classes/java/lang/invoke/MemberName.java
Print this page
rev 12617 : [mq]: 8134356-gt-lt-in-code
*** 91,101 ****
}
/** Return the simple name of this member.
* For a type, it is the same as {@link Class#getSimpleName}.
* For a method or field, it is the simple name of the member.
! * For a constructor, it is always {@code "<init>"}.
*/
public String getName() {
if (name == null) {
expandFromVM();
if (name == null) {
--- 91,101 ----
}
/** Return the simple name of this member.
* For a type, it is the same as {@link Class#getSimpleName}.
* For a method or field, it is the simple name of the member.
! * For a constructor, it is always {@code "<init>"}.
*/
public String getName() {
if (name == null) {
expandFromVM();
if (name == null) {
*** 725,735 ****
init(defClass, name, type, flagsMods(IS_FIELD, 0, refKind));
initResolved(false);
}
/** Create a method or constructor name from the given components:
* Declaring class, name, type, reference kind.
! * It will be a constructor if and only if the name is {@code "<init>"}.
* The declaring class may be supplied as null if this is to be a bare name and type.
* The last argument is optional, a boolean which requests REF_invokeSpecial.
* The resulting name will in an unresolved state.
*/
public MemberName(Class<?> defClass, String name, MethodType type, byte refKind) {
--- 725,735 ----
init(defClass, name, type, flagsMods(IS_FIELD, 0, refKind));
initResolved(false);
}
/** Create a method or constructor name from the given components:
* Declaring class, name, type, reference kind.
! * It will be a constructor if and only if the name is {@code "<init>"}.
* The declaring class may be supplied as null if this is to be a bare name and type.
* The last argument is optional, a boolean which requests REF_invokeSpecial.
* The resulting name will in an unresolved state.
*/
public MemberName(Class<?> defClass, String name, MethodType type, byte refKind) {
< prev index next >