Java Code Examples for java.lang.reflect.Constructor#getClass()

The following examples show how to use java.lang.reflect.Constructor#getClass() . You can vote up the ones you like or vote down the ones you don't like, and go to the original project or source file by following the links above each example. You may check out the related API usage on the sidebar.
Example 1
Source File: MemberName.java    From jdk1.8-source-analysis with Apache License 2.0 5 votes vote down vote up
/** Create a name for the given reflected constructor.  The resulting name will be in a resolved state. */
@SuppressWarnings("LeakingThisInConstructor")
public MemberName(Constructor<?> ctor) {
    ctor.getClass();  // NPE check
    // fill in vmtarget, vmindex while we have ctor in hand:
    MethodHandleNatives.init(this, ctor);
    assert(isResolved() && this.clazz != null);
    this.name = CONSTRUCTOR_NAME;
    if (this.type == null)
        this.type = new Object[] { void.class, ctor.getParameterTypes() };
}
 
Example 2
Source File: MemberName.java    From dragonwell8_jdk with GNU General Public License v2.0 5 votes vote down vote up
/** Create a name for the given reflected constructor.  The resulting name will be in a resolved state. */
@SuppressWarnings("LeakingThisInConstructor")
public MemberName(Constructor<?> ctor) {
    ctor.getClass();  // NPE check
    // fill in vmtarget, vmindex while we have ctor in hand:
    MethodHandleNatives.init(this, ctor);
    assert(isResolved() && this.clazz != null);
    this.name = CONSTRUCTOR_NAME;
    if (this.type == null)
        this.type = new Object[] { void.class, ctor.getParameterTypes() };
}
 
Example 3
Source File: MemberName.java    From TencentKona-8 with GNU General Public License v2.0 5 votes vote down vote up
/** Create a name for the given reflected constructor.  The resulting name will be in a resolved state. */
@SuppressWarnings("LeakingThisInConstructor")
public MemberName(Constructor<?> ctor) {
    ctor.getClass();  // NPE check
    // fill in vmtarget, vmindex while we have ctor in hand:
    MethodHandleNatives.init(this, ctor);
    assert(isResolved() && this.clazz != null);
    this.name = CONSTRUCTOR_NAME;
    if (this.type == null)
        this.type = new Object[] { void.class, ctor.getParameterTypes() };
}
 
Example 4
Source File: MemberName.java    From jdk8u60 with GNU General Public License v2.0 5 votes vote down vote up
/** Create a name for the given reflected constructor.  The resulting name will be in a resolved state. */
@SuppressWarnings("LeakingThisInConstructor")
public MemberName(Constructor<?> ctor) {
    ctor.getClass();  // NPE check
    // fill in vmtarget, vmindex while we have ctor in hand:
    MethodHandleNatives.init(this, ctor);
    assert(isResolved() && this.clazz != null);
    this.name = CONSTRUCTOR_NAME;
    if (this.type == null)
        this.type = new Object[] { void.class, ctor.getParameterTypes() };
}
 
Example 5
Source File: MemberName.java    From JDKSourceCode1.8 with MIT License 5 votes vote down vote up
/** Create a name for the given reflected constructor.  The resulting name will be in a resolved state. */
@SuppressWarnings("LeakingThisInConstructor")
public MemberName(Constructor<?> ctor) {
    ctor.getClass();  // NPE check
    // fill in vmtarget, vmindex while we have ctor in hand:
    MethodHandleNatives.init(this, ctor);
    assert(isResolved() && this.clazz != null);
    this.name = CONSTRUCTOR_NAME;
    if (this.type == null)
        this.type = new Object[] { void.class, ctor.getParameterTypes() };
}
 
Example 6
Source File: MemberName.java    From openjdk-jdk8u with GNU General Public License v2.0 5 votes vote down vote up
/** Create a name for the given reflected constructor.  The resulting name will be in a resolved state. */
@SuppressWarnings("LeakingThisInConstructor")
public MemberName(Constructor<?> ctor) {
    ctor.getClass();  // NPE check
    // fill in vmtarget, vmindex while we have ctor in hand:
    MethodHandleNatives.init(this, ctor);
    assert(isResolved() && this.clazz != null);
    this.name = CONSTRUCTOR_NAME;
    if (this.type == null)
        this.type = new Object[] { void.class, ctor.getParameterTypes() };
}
 
Example 7
Source File: MemberName.java    From openjdk-jdk8u-backup with GNU General Public License v2.0 5 votes vote down vote up
/** Create a name for the given reflected constructor.  The resulting name will be in a resolved state. */
@SuppressWarnings("LeakingThisInConstructor")
public MemberName(Constructor<?> ctor) {
    ctor.getClass();  // NPE check
    // fill in vmtarget, vmindex while we have ctor in hand:
    MethodHandleNatives.init(this, ctor);
    assert(isResolved() && this.clazz != null);
    this.name = CONSTRUCTOR_NAME;
    if (this.type == null)
        this.type = new Object[] { void.class, ctor.getParameterTypes() };
}
 
Example 8
Source File: MemberName.java    From jdk8u-jdk with GNU General Public License v2.0 5 votes vote down vote up
/** Create a name for the given reflected constructor.  The resulting name will be in a resolved state. */
@SuppressWarnings("LeakingThisInConstructor")
public MemberName(Constructor<?> ctor) {
    ctor.getClass();  // NPE check
    // fill in vmtarget, vmindex while we have ctor in hand:
    MethodHandleNatives.init(this, ctor);
    assert(isResolved() && this.clazz != null);
    this.name = CONSTRUCTOR_NAME;
    if (this.type == null)
        this.type = new Object[] { void.class, ctor.getParameterTypes() };
}
 
Example 9
Source File: MemberName.java    From Java8CN with Apache License 2.0 5 votes vote down vote up
/** Create a name for the given reflected constructor.  The resulting name will be in a resolved state. */
@SuppressWarnings("LeakingThisInConstructor")
public MemberName(Constructor<?> ctor) {
    ctor.getClass();  // NPE check
    // fill in vmtarget, vmindex while we have ctor in hand:
    MethodHandleNatives.init(this, ctor);
    assert(isResolved() && this.clazz != null);
    this.name = CONSTRUCTOR_NAME;
    if (this.type == null)
        this.type = new Object[] { void.class, ctor.getParameterTypes() };
}
 
Example 10
Source File: MemberName.java    From hottub with GNU General Public License v2.0 5 votes vote down vote up
/** Create a name for the given reflected constructor.  The resulting name will be in a resolved state. */
@SuppressWarnings("LeakingThisInConstructor")
public MemberName(Constructor<?> ctor) {
    ctor.getClass();  // NPE check
    // fill in vmtarget, vmindex while we have ctor in hand:
    MethodHandleNatives.init(this, ctor);
    assert(isResolved() && this.clazz != null);
    this.name = CONSTRUCTOR_NAME;
    if (this.type == null)
        this.type = new Object[] { void.class, ctor.getParameterTypes() };
}
 
Example 11
Source File: MemberName.java    From openjdk-8-source with GNU General Public License v2.0 5 votes vote down vote up
/** Create a name for the given reflected constructor.  The resulting name will be in a resolved state. */
@SuppressWarnings("LeakingThisInConstructor")
public MemberName(Constructor<?> ctor) {
    ctor.getClass();  // NPE check
    // fill in vmtarget, vmindex while we have ctor in hand:
    MethodHandleNatives.init(this, ctor);
    assert(isResolved() && this.clazz != null);
    this.name = CONSTRUCTOR_NAME;
    if (this.type == null)
        this.type = new Object[] { void.class, ctor.getParameterTypes() };
}
 
Example 12
Source File: MemberName.java    From openjdk-8 with GNU General Public License v2.0 5 votes vote down vote up
/** Create a name for the given reflected constructor.  The resulting name will be in a resolved state. */
@SuppressWarnings("LeakingThisInConstructor")
public MemberName(Constructor<?> ctor) {
    ctor.getClass();  // NPE check
    // fill in vmtarget, vmindex while we have ctor in hand:
    MethodHandleNatives.init(this, ctor);
    assert(isResolved() && this.clazz != null);
    this.name = CONSTRUCTOR_NAME;
    if (this.type == null)
        this.type = new Object[] { void.class, ctor.getParameterTypes() };
}
 
Example 13
Source File: MemberName.java    From jdk8u_jdk with GNU General Public License v2.0 5 votes vote down vote up
/** Create a name for the given reflected constructor.  The resulting name will be in a resolved state. */
@SuppressWarnings("LeakingThisInConstructor")
public MemberName(Constructor<?> ctor) {
    ctor.getClass();  // NPE check
    // fill in vmtarget, vmindex while we have ctor in hand:
    MethodHandleNatives.init(this, ctor);
    assert(isResolved() && this.clazz != null);
    this.name = CONSTRUCTOR_NAME;
    if (this.type == null)
        this.type = new Object[] { void.class, ctor.getParameterTypes() };
}
 
Example 14
Source File: MemberName.java    From jdk8u-jdk with GNU General Public License v2.0 5 votes vote down vote up
/** Create a name for the given reflected constructor.  The resulting name will be in a resolved state. */
@SuppressWarnings("LeakingThisInConstructor")
public MemberName(Constructor<?> ctor) {
    ctor.getClass();  // NPE check
    // fill in vmtarget, vmindex while we have ctor in hand:
    MethodHandleNatives.init(this, ctor);
    assert(isResolved() && this.clazz != null);
    this.name = CONSTRUCTOR_NAME;
    if (this.type == null)
        this.type = new Object[] { void.class, ctor.getParameterTypes() };
}
 
Example 15
Source File: MemberName.java    From jdk-1.7-annotated with Apache License 2.0 5 votes vote down vote up
/** Create a name for the given reflected constructor.  The resulting name will be in a resolved state. */
@SuppressWarnings("LeakingThisInConstructor")
public MemberName(Constructor<?> ctor) {
    ctor.getClass();  // NPE check
    // fill in vmtarget, vmindex while we have ctor in hand:
    MethodHandleNatives.init(this, ctor);
    assert(isResolved() && this.clazz != null);
    this.name = CONSTRUCTOR_NAME;
    if (this.type == null)
        this.type = new Object[] { void.class, ctor.getParameterTypes() };
}
 
Example 16
Source File: MemberName.java    From jdk8u-dev-jdk with GNU General Public License v2.0 5 votes vote down vote up
/** Create a name for the given reflected constructor.  The resulting name will be in a resolved state. */
@SuppressWarnings("LeakingThisInConstructor")
public MemberName(Constructor<?> ctor) {
    ctor.getClass();  // NPE check
    // fill in vmtarget, vmindex while we have ctor in hand:
    MethodHandleNatives.init(this, ctor);
    assert(isResolved() && this.clazz != null);
    this.name = CONSTRUCTOR_NAME;
    if (this.type == null)
        this.type = new Object[] { void.class, ctor.getParameterTypes() };
}