本文整理汇总了Java中java.lang.reflect.Constructor.getName方法的典型用法代码示例。如果您正苦于以下问题:Java Constructor.getName方法的具体用法?Java Constructor.getName怎么用?Java Constructor.getName使用的例子?那么恭喜您, 这里精选的方法代码示例或许可以为您提供帮助。您也可以进一步了解该方法所在类java.lang.reflect.Constructor
的用法示例。
在下文中一共展示了Constructor.getName方法的3个代码示例,这些例子默认根据受欢迎程度排序。您可以为喜欢或者感觉有用的代码点赞,您的评价将有助于系统推荐出更棒的Java代码示例。
示例1: MemberSignature
import java.lang.reflect.Constructor; //导入方法依赖的package包/类
public MemberSignature(Constructor<?> cons) {
member = cons;
name = cons.getName();
signature = getMethodSignature(
cons.getParameterTypes(), Void.TYPE);
}
示例2: MBeanConstructorInfo
import java.lang.reflect.Constructor; //导入方法依赖的package包/类
/**
* Constructs an <CODE>MBeanConstructorInfo</CODE> object. The
* {@link Descriptor} of the constructed object will include
* fields contributed by any annotations on the {@code
* Constructor} object that contain the {@link DescriptorKey}
* meta-annotation.
*
* @param description A human readable description of the operation.
* @param constructor The <CODE>java.lang.reflect.Constructor</CODE>
* object describing the MBean constructor.
*/
public MBeanConstructorInfo(String description, Constructor<?> constructor) {
this(constructor.getName(), description,
constructorSignature(constructor),
Introspector.descriptorForElement(constructor));
}
示例3: MBeanConstructorInfo
import java.lang.reflect.Constructor; //导入方法依赖的package包/类
/**
* Constructs an {@code MBeanConstructorInfo} object. The
* {@link Descriptor} of the constructed object will include
* fields contributed by any annotations on the {@code
* Constructor} object that contain the {@link DescriptorKey}
* meta-annotation.
*
* @param description A human readable description of the operation.
* @param constructor The {@code java.lang.reflect.Constructor}
* object describing the MBean constructor.
*/
public MBeanConstructorInfo(String description, Constructor<?> constructor) {
this(constructor.getName(), description,
constructorSignature(constructor),
Introspector.descriptorForElement(constructor));
}