本文整理了Java中org.jboss.errai.codegen.meta.MetaClass.getConstructors()
方法的一些代码示例,展示了MetaClass.getConstructors()
的具体用法。这些代码示例主要来源于Github
/Stackoverflow
/Maven
等平台,是从一些精选项目中提取出来的代码,具有较强的参考意义,能在一定程度帮忙到你。MetaClass.getConstructors()
方法的具体详情如下:
包路径:org.jboss.errai.codegen.meta.MetaClass
类名称:MetaClass
方法名:getConstructors
暂无
代码示例来源:origin: errai/errai
private List<MetaConstructor> getInjectableConstructors(final MetaClass type) {
final Collection<Class<? extends Annotation>> injectAnnotations = injectionContext.getAnnotationsForElementType(WiringElementType.InjectionPoint);
final List<MetaConstructor> cons = new ArrayList<>();
for (final MetaConstructor con : type.getConstructors()) {
for (final Class<? extends Annotation> anno : injectAnnotations) {
if (con.isAnnotationPresent(anno)) {
cons.add(con);
}
}
}
return cons;
}
代码示例来源:origin: errai/errai
private MetaConstructor getInjectableConstructor(final MetaClass type) {
final Collection<Class<? extends Annotation>> injectAnnotations = injectionContext.getAnnotationsForElementType(WiringElementType.InjectionPoint);
for (final MetaConstructor con : type.getConstructors()) {
for (final Class<? extends Annotation> anno : injectAnnotations) {
if (con.isAnnotationPresent(anno)) {
return con;
}
}
}
return null;
}
代码示例来源:origin: errai/errai
for (final MetaConstructor ctor : enclosingType.getConstructors()) {
if (ctor.isAnnotationPresent(annoType)) {
annotated.add(ctor);
for (final MetaConstructor ctor : enclosingType.getConstructors()) {
for (final MetaParameter param : ctor.getParameters()) {
if (param.isAnnotationPresent(annoType)) {
代码示例来源:origin: org.jboss.errai/errai-data-binding
for (final MetaConstructor ctor : enclosingType.getConstructors()) {
if (ctor.isAnnotationPresent(annoType)) {
annotated.add(ctor);
for (final MetaConstructor ctor : enclosingType.getConstructors()) {
for (final MetaParameter param : ctor.getParameters()) {
if (param.isAnnotationPresent(annoType)) {
代码示例来源:origin: errai/errai
final MetaConstructor[] objMethods = Object_MetaClass.getConstructors();
final MetaConstructor[] nMethods = new MetaConstructor[constructors.length + objMethods.length];
System.arraycopy(constructors, 0, nMethods, 0, constructors.length);
代码示例来源:origin: org.jboss.errai/errai-codegen
final MetaConstructor[] objMethods = Object_MetaClass.getConstructors();
final MetaConstructor[] nMethods = new MetaConstructor[constructors.length + objMethods.length];
System.arraycopy(constructors, 0, nMethods, 0, constructors.length);
代码示例来源:origin: errai/errai
@Test
public void testGetConstructors() throws Exception {
final MetaClass mc = getMetaClass(HasManyConstructors.class);
final MetaConstructor[] ctors = mc.getConstructors();
assertEquals("Expected only a single visible constructor to be returned.", 1, ctors.length);
}
内容来源于网络,如有侵权,请联系作者删除!