Return an instance of the constructor builder for the given class.

@return an instance of the constructor builder for the given class.
962372
public AbstractBuilder getConstructorBuilder(ClassWriter classWriter)
            throws Exception {
        return ConstructorBuilder.getInstance(context,
            classWriter.getClassDoc(),
            writerFactory.getConstructorWriter(classWriter));
    }
79703
@SafeVarargs
    public static <T> Constructor<T> getDeclaredConstructor(final Class<T> cls, final Class<?>... parameterTypes) {
        Map<Class<?>[], Constructor<?>> constructorPool = classDeclaredConstructorPool.get(cls);
        Constructor<T> constructor = null;

        if (constructorPool != null) {
            constructor = (Constructor<T>) constructorPool.get(parameterTypes);
        }

        if (constructor == null) {
            try {
                constructor = cls.getDeclaredConstructor(parameterTypes);

                // SHOULD NOT set it true here.
                // constructor.setAccessible(true);
            } catch (NoSuchMethodException e) {
                // ignore.
            }

            if (constructor != null) {
                if (constructorPool == null) {
                    constructorPool = new ArrayHashMap<>(ConcurrentHashMap.class);
                    classDeclaredConstructorPool.put(cls, constructorPool);
                }

                constructorPool.put(parameterTypes.clone(), constructor);
            }
        }

        return constructor;
    }
437303
public static ConstructorNode getDefaultConstructor(ClassNode classNode) {
        for (ConstructorNode cons : classNode.getDeclaredConstructors()) {
            if (cons.getParameters().length == 0) {
                return cons;
            }
        }
        return null;
    }
567385
public static ClassBuilder getInstance(Context context,
            TypeElement typeElement, ClassWriter writer) {
        return new ClassBuilder(context, typeElement, writer);
    }
1280415
public static Constructor<?>[] constructorsDeclaredIn(final Class<?> cls, final Class<?>... additionalClasses) {
        if (cls == null) {
            throw new IllegalArgumentException("You need to supply at least one class.");
        }
        Set<Constructor<?>> constructors = new HashSet<Constructor<?>>();
        constructors.addAll(asList(WhiteboxImpl.getAllConstructors(cls)));
        for (Class<?> klass : additionalClasses) {
            constructors.addAll(asList(WhiteboxImpl.getAllConstructors(klass)));
        }
        return constructors.toArray(new Constructor[constructors.size()]);
    }
920478
public ISarlConstructorBuilder addSarlConstructor() {
		ISarlConstructorBuilder builder = this.iSarlConstructorBuilderProvider.get();
		builder.eInit(getSarlClass(), getTypeResolutionContext());
		return builder;
	}
246734
@Nonnull
	public static <T, R> LObjIntBoolFunction<T, R> objIntBoolFunctionFrom(Consumer<LObjIntBoolFunctionBuilder<T, R>> buildingFunction) {
		LObjIntBoolFunctionBuilder builder = new LObjIntBoolFunctionBuilder();
		buildingFunction.accept(builder);
		return builder.build();
	}
749418
public static ConstructorInstance getConstructorInstance(Class clazz, Object[] args) throws NoSuchMethodException {
	ConstructorInstance ci = getConstructorInstance(clazz, args, null);
	if (ci != null) return ci;
	throw new NoSuchMethodException("No matching Constructor for " + clazz.getName() + "(" + getDspMethods(getClasses(args)) + ") found");
    }
946121
public static <T> Constructor<T> getConstructor(Class<T> cls, Class... params) {
        try {
            return cls.getConstructor(params);
        } catch (Exception e) {
            throw new ClientException(e);
        }
    }
695395
protected T createInstance() {
        try {
            Constructor<T> ctor = clazz.getDeclaredConstructor();
            ctor.setAccessible(true);
            return ctor.newInstance();
        } catch (InstantiationException e) {
            throw new RuntimeException(e);
        } catch (IllegalAccessException e) {
            throw new RuntimeException(e);
        } catch (SecurityException e) {
            throw new RuntimeException(e);
        } catch (NoSuchMethodException e) {
            throw new RuntimeException(e);
        } catch (IllegalArgumentException e) {
            throw new RuntimeException(e);
        } catch (InvocationTargetException e) {
            throw new RuntimeException(e);
        }
    }
258177
@Nonnull
	public static <T1, T2, R> LBiObjBoolFunction<T1, T2, R> biObjBoolFunctionFrom(Consumer<LBiObjBoolFunctionBuilder<T1, T2, R>> buildingFunction) {
		LBiObjBoolFunctionBuilder builder = new LBiObjBoolFunctionBuilder();
		buildingFunction.accept(builder);
		return builder.build();
	}
1017764
public static JustificationBuilder getInstance() {

    if (instance == null) {
      synchronized (JustificationBuilderImpl.class) {
        if (instance == null) {
          instance = new JustificationBuilderImpl();
        }
      }
    }
    return instance;
  }
301454
public static DocumentBuilderFactory newInstance(String factoryClassName,
            ClassLoader classLoader) {
        if (factoryClassName == null) {
            throw new FactoryConfigurationError("factoryClassName == null");
        }
        if (classLoader == null) {
            classLoader = Thread.currentThread().getContextClassLoader();
        }
        try {
            Class<?> type = classLoader != null
                    ? classLoader.loadClass(factoryClassName)
                    : Class.forName(factoryClassName);
            return (DocumentBuilderFactory) type.newInstance();
        } catch (ClassNotFoundException e) {
            throw new FactoryConfigurationError(e);
        } catch (InstantiationException e) {
            throw new FactoryConfigurationError(e);
        } catch (IllegalAccessException e) {
            throw new FactoryConfigurationError(e);
        }
    }
1164178
public static <T> T newInstance(Class<T> class1) {
		try {
			return class1.newInstance();
		} catch (Exception e) {
			throww(e);
			return null;
		}
	}
43977
protected Constructor<?> getConstructor(Class<?> clazz, Class<?> paramClass) {
        for (Constructor<?> c : clazz.getConstructors()) {
            Class<?>[] paramTypes = c.getParameterTypes();
            if (paramTypes.length != 1) {
                continue;
            }
            if (paramTypes[0].equals(paramClass)) {
                return c;
            }
        }
        return null;
    }
42121
public <P extends ProcessBuilder> QueueBuilder<P> newQueueBuilder(Class<P> process_builder_class)
    {
        return QueueFactory.newQueueBuilder(this, process_builder_class);
    }
258899
public ImmutableList<Constructor> getConstructors(Class classDefinition) {
        if (definedClasses.getRootValue().containsKey(classDefinition)) {
            return definedClasses.getRootValue().get(classDefinition);
        }
        return new ImmutableArrayList<>();
    }