java.lang.reflect.Constructor.isSynthetic()方法的使用及代码示例

x33g5p2x  于2022-01-17 转载在 其他  
字(3.7k)|赞(0)|评价(0)|浏览(177)

本文整理了Java中java.lang.reflect.Constructor.isSynthetic()方法的一些代码示例,展示了Constructor.isSynthetic()的具体用法。这些代码示例主要来源于Github/Stackoverflow/Maven等平台,是从一些精选项目中提取出来的代码,具有较强的参考意义,能在一定程度帮忙到你。Constructor.isSynthetic()方法的具体详情如下:
包路径:java.lang.reflect.Constructor
类名称:Constructor
方法名:isSynthetic

Constructor.isSynthetic介绍

[英]Indicates whether or not this constructor is synthetic (artificially introduced by the compiler).
[中]指示此构造函数是否是合成的(由编译器人工引入)。

代码示例

代码示例来源:origin: redisson/redisson

/**
 * {@inheritDoc}
 */
public boolean isSynthetic() {
  return constructor.isSynthetic();
}

代码示例来源:origin: prestodb/presto

private static boolean isIncludableConstructor(Constructor<?> c) {
    return !c.isSynthetic();
  }
}

代码示例来源:origin: redisson/redisson

private static boolean isIncludableConstructor(Constructor<?> c) {
    return !c.isSynthetic();
  }
}

代码示例来源:origin: spring-projects/spring-loaded

public static boolean callIsSynthetic(Constructor thiz) {
  return thiz.isSynthetic();
}

代码示例来源:origin: apache/drill

private static boolean isIncludableConstructor(Constructor<?> c) {
    return !c.isSynthetic();
  }
}

代码示例来源:origin: spring-projects/spring-framework

int nonSyntheticConstructors = 0;
for (Constructor<?> candidate : rawCandidates) {
  if (!candidate.isSynthetic()) {
    nonSyntheticConstructors++;

代码示例来源:origin: redisson/redisson

candidates:
for (Constructor<?> constructor : type.getConstructors()) {
  if (!constructor.isSynthetic()) {
    List<Object> arguments = new ArrayList<Object>(constructor.getParameterTypes().length);
    int index = 0;

代码示例来源:origin: org.springframework/spring-beans

int nonSyntheticConstructors = 0;
for (Constructor<?> candidate : rawCandidates) {
  if (!candidate.isSynthetic()) {
    nonSyntheticConstructors++;

代码示例来源:origin: org.mongodb/mongo-java-driver

CreatorExecutable<T> creatorExecutable = null;
for (Constructor<?> constructor : clazz.getDeclaredConstructors()) {
  if (isPublic(constructor.getModifiers()) && !constructor.isSynthetic()) {
    for (Annotation annotation : constructor.getDeclaredAnnotations()) {
      if (annotation.annotationType().equals(BsonCreator.class)) {

代码示例来源:origin: INRIA/spoon

if (constructor.isSynthetic()) {
  continue;

代码示例来源:origin: INRIA/spoon

if (constructor.isSynthetic()) {
  continue;

代码示例来源:origin: aadnk/ProtocolLib

@Override
public boolean isSynthetic() {
  return constructor.isSynthetic();
}
@Override

代码示例来源:origin: KostyaSha/yet-another-docker-plugin

private static boolean isIncludableConstructor(Constructor<?> c) {
    return !c.isSynthetic();
  }
}

代码示例来源:origin: gosu-lang/old-gosu-repo

@Override
public boolean isSynthetic() {
 return _ctor.isSynthetic();
}

代码示例来源:origin: com.fitbur.external/external-bytebuddy

@Override
public boolean isSynthetic() {
  return constructor.isSynthetic();
}

代码示例来源:origin: org.jboss.errai/errai-codegen

@Override
public boolean isSynthetic() {
 return constructor.isSynthetic();
}

代码示例来源:origin: EvoSuite/evosuite

protected static boolean isUsable(Constructor<?> c) {
  return !c.isSynthetic() &&
      !Modifier.isNative(c.getModifiers()) &&
      !c.getName().contains("<clinit>");
}

代码示例来源:origin: br.com.caelum/iogi

public Constructors constructors(ParameterNamesProvider parameterNamesProvider, DependenciesInjector dependenciesInjector) {
  final HashSet<ClassConstructor> classConstructors = new HashSet<ClassConstructor>();
  for (final Constructor<?> constructor : getClassType().getDeclaredConstructors()) {
    if (!constructor.isSynthetic())
     classConstructors.add(new ClassConstructor(constructor, parameterNamesProvider));
  }
  return new Constructors(classConstructors, dependenciesInjector);
}

代码示例来源:origin: com.googlecode.openpojo/openpojo

public boolean isSynthetic() {
  if (isConstructor()) {
    return getAsConstructor().isSynthetic();
  }
  return getAsMethod().isSynthetic();
}

代码示例来源:origin: OpenPojo/openpojo

public boolean isSynthetic() {
 if (isConstructor()) {
  return getAsConstructor().isSynthetic();
 }
 return getAsMethod().isSynthetic();
}

相关文章