<commit_before>package org.springframework.roo.classpath.details;

import java.util.ArrayList;
import java.util.List;

import org.springframework.roo.model.Builder;
import org.springframework.roo.model.JavaType;

/**
 * Abstract {@link Builder} to assist building {@link MemberHoldingTypeDetails} implementations.
 * 
 * @author <NAME>
 * @since 1.1
 */
public abstract class AbstractMemberHoldingTypeDetailsBuilder<T extends MemberHoldingTypeDetails> extends AbstractIdentifiableAnnotatedJavaStructureBuilder<T> {
	private List<ConstructorMetadataBuilder> declaredConstructors = new ArrayList<ConstructorMetadataBuilder>();
	private List<FieldMetadataBuilder> declaredFields = new ArrayList<FieldMetadataBuilder>();
	private List<MethodMetadataBuilder> declaredMethods = new ArrayList<MethodMetadataBuilder>();
	private List<ClassOrInterfaceTypeDetailsBuilder> declaredInnerTypes = new ArrayList<ClassOrInterfaceTypeDetailsBuilder>();
	private List<InitializerMetadataBuilder> declaredInitializers = new ArrayList<InitializerMetadataBuilder>();
	private List<JavaType> extendsTypes = new ArrayList<JavaType>();
	private List<JavaType> implementsTypes = new ArrayList<JavaType>();

	protected AbstractMemberHoldingTypeDetailsBuilder(String declaredbyMetadataId) {
		super(declaredbyMetadataId);
	}
	
	protected AbstractMemberHoldingTypeDetailsBuilder(MemberHoldingTypeDetails existing) {
		super(existing);
		init(existing);
	}

	protected AbstractMemberHoldingTypeDetailsBuilder(String declaredbyMetadataId, ClassOrInterfaceTypeDetails existing) {
		super(declaredbyMetadataId, existing);
		init(existing);
	}

	private void init(MemberHoldingTypeDetails existing) {
		for (ConstructorMetadata element : existing.getDeclaredConstructors()) {
			declaredConstructors.add(new ConstructorMetadataBuilder(element));
		}
		for (FieldMetadata element : existing.getDeclaredFields()) {
			declaredFields.add(new FieldMetadataBuilder(element));
		}<commit_msg>ROO-2088: Provide overloaded constructors to AbstractIdentifiableAnnotatedJavaStructureBuilder instances - fixed typo<commit_after>package org.springframework.roo.classpath.details;

import java.util.ArrayList;
import java.util.List;

import org.springframework.roo.model.Builder;
import org.springframework.roo.model.JavaType;

/**
 * Abstract {@link Builder} to assist building {@link MemberHoldingTypeDetails} implementations.
 * 
 * @author <NAME>
 * @since 1.1
 */
public abstract class AbstractMemberHoldingTypeDetailsBuilder<T extends MemberHoldingTypeDetails> extends AbstractIdentifiableAnnotatedJavaStructureBuilder<T> {
	private List<ConstructorMetadataBuilder> declaredConstructors = new ArrayList<ConstructorMetadataBuilder>();
	private List<FieldMetadataBuilder> declaredFields = new ArrayList<FieldMetadataBuilder>();
	private List<MethodMetadataBuilder> declaredMethods = new ArrayList<MethodMetadataBuilder>();
	private List<ClassOrInterfaceTypeDetailsBuilder> declaredInnerTypes = new ArrayList<ClassOrInterfaceTypeDetailsBuilder>();
	private List<InitializerMetadataBuilder> declaredInitializers = new ArrayList<InitializerMetadataBuilder>();
	private List<JavaType> extendsTypes = new ArrayList<JavaType>();
	private List<JavaType> implementsTypes = new ArrayList<JavaType>();

	protected AbstractMemberHoldingTypeDetailsBuilder(String declaredbyMetadataId) {
		super(declaredbyMetadataId);
	}
	
	protected AbstractMemberHoldingTypeDetailsBuilder(MemberHoldingTypeDetails existing) {
		super(existing);
		init(existing);
	}

	protected AbstractMemberHoldingTypeDetailsBuilder(String declaredbyMetadataId, MemberHoldingTypeDetails existing) {
		super(declaredbyMetadataId, existing);
		init(existing);
	}

	private void init(MemberHoldingTypeDetails existing) {
		for (ConstructorMetadata element : existing.getDeclaredConstructors()) {
			declaredConstructors.add(new ConstructorMetadataBuilder(element));
		}
		for (FieldMetadata element : existing.getDeclaredFields()) {
			declaredFields.add(new FieldMetadataBuilder(element));
		}
{'fraction_non_alphanumeric': 0.08360369353631146, 'fraction_numerical': 0.001996506114299975, 'mean_word_length': 8.681159420289855, 'pattern_counts': {'":': 0, '<': 37, '<?xml version=': 0, '>': 37, 'https://': 0, 'lorem ipsum': 0, 'www.': 0, 'xml': 0}, 'pii_count': 0, 'substrings_counts': 0, 'word_list_counts': {'cursed_substrings.json': 0, 'profanity_word_list.json': 0, 'sexual_word_list.json': 0, 'zh_pornsignals.json': 0}}
{'dir': 'git-commits-cleaned', 'id': '7327414', 'n_tokens_mistral': 1025, 'n_tokens_neox': 979, 'n_words': 206}