識別子を生成する方法を検証します。

@param generationType 識別子を生成する方法
323696
protected void validateGenerationType(GenerationType generationType) {
    if (generationType == null) {
      return;
    }
    if (generationType == GenerationType.IDENTITY) {
      if (!dialect.supportsIdentity()) {
        throw new GenException(Message.DOMAGEN0003, dialect.getName());
      }
    } else if (generationType == GenerationType.SEQUENCE) {
      if (!dialect.supportsSequence()) {
        throw new GenException(Message.DOMAGEN0004, dialect.getName());
      }
    }
  }
1238626
private static <T, G extends T> void generateOnMeasureMethod(DexMaker dexMaker,
                                                                 TypeId<G> generatedType,
                                                                 TypeId<T> baseType) {
        final FieldId<G, Interceptor> interceptorField =
                generatedType.getField(INTERCEPTOR_TYPE, FIELD_NAME_INTERCEPTOR);

        final String methodName = ViewMethod.ON_MEASURE.getName();

        final MethodId<T, Void> superMethod = baseType.getMethod(VOID_TYPE, methodName, TypeId.INT,
                TypeId.INT);
        final MethodId<Interceptor, Void> onMeasureMethod =
                INTERCEPTOR_TYPE.getMethod(VOID_TYPE, methodName, VIEW_TYPE, TypeId.INT, TypeId.INT);

        final MethodId<G, Void> methodId = generatedType.getMethod(VOID_TYPE, methodName,
                TypeId.INT, TypeId.INT);
        final Code code = dexMaker.declare(methodId, PUBLIC);

        final Local<G> localThis = code.getThis(generatedType);
        final Local<Interceptor> nullInterceptor = code.newLocal(INTERCEPTOR_TYPE);
        final Local<Interceptor> localInterceptor = code.newLocal(INTERCEPTOR_TYPE);
        final Local<Integer> localWidth = code.getParameter(0, TypeId.INT);
        final Local<Integer> localHeight = code.getParameter(1, TypeId.INT);

        code.iget(interceptorField, localInterceptor, localThis);
        code.loadConstant(nullInterceptor, null);

        // Interceptor is not null, call it.
        final Label interceptorNullCase = new Label();
        code.compare(Comparison.EQ, interceptorNullCase, nullInterceptor, localInterceptor);
        code.invokeVirtual(onMeasureMethod, null, localInterceptor, localThis,
                localWidth, localHeight);
        code.returnVoid();

        // Interceptor is null, call super method.
        code.mark(interceptorNullCase);
        code.invokeSuper(superMethod, null, localThis, localWidth, localHeight);
        code.returnVoid();

        final MethodId<G, Void> callsSuperMethod = generatedType.getMethod(VOID_TYPE,
                ViewMethod.ON_MEASURE.getInvokeName(), TypeId.INT, TypeId.INT);

        final Code superCode = dexMaker.declare(callsSuperMethod, PUBLIC);

        final Local<G> superThis = superCode.getThis(generatedType);
        final Local<Integer> superLocalWidth = superCode.getParameter(0, TypeId.INT);
        final Local<Integer> superLocalHeight = superCode.getParameter(1, TypeId.INT);
        superCode.invokeSuper(superMethod, null, superThis, superLocalWidth, superLocalHeight);
        superCode.returnVoid();
    }
1149229
private void cmbJavaTypeActionPerformed (java.awt.event.ActionEvent evt)//GEN-FIRST:event_cmbJavaTypeActionPerformed
  {//GEN-HEADEREND:event_cmbJavaTypeActionPerformed
    // Add your handling code here:
    aColumn.setJavaFieldType(cmbJavaType.getSelectedItem().toString());
    if (cmbJavaType.getModel() instanceof org.apache.ojb.tools.swing.SortingComboBoxModel)
    {
      org.apache.ojb.tools.swing.SortingComboBoxModel cmbModel = 
        (org.apache.ojb.tools.swing.SortingComboBoxModel)this.cmbJavaType.getModel();
      if (cmbModel.getIndexOf(cmbJavaType.getSelectedItem()) == -1 )
        cmbJavaType.addItem(cmbJavaType.getSelectedItem());
    }
    else if (cmbJavaType.getModel() instanceof javax.swing.DefaultComboBoxModel)
    {
      javax.swing.DefaultComboBoxModel cmbModel = 
        (javax.swing.DefaultComboBoxModel)this.cmbJavaType.getModel();
      if (cmbModel.getIndexOf(cmbJavaType.getSelectedItem()) == -1 )
        cmbJavaType.addItem(cmbJavaType.getSelectedItem());      
    }
  }
1326116
private static <T, G extends T> void generateOnLayoutMethod(DexMaker dexMaker,
                                                                TypeId<G> generatedType,
                                                                TypeId<T> baseType) {
        final FieldId<G, Interceptor> interceptorField =
                generatedType.getField(INTERCEPTOR_TYPE, FIELD_NAME_INTERCEPTOR);

        final String methodName = ViewMethod.ON_LAYOUT.getName();

        final MethodId<T, Void> superMethod = baseType.getMethod(VOID_TYPE, methodName,
                TypeId.BOOLEAN, TypeId.INT, TypeId.INT, TypeId.INT, TypeId.INT);
        final MethodId<Interceptor, Void> onLayoutMethod =
                INTERCEPTOR_TYPE.getMethod(VOID_TYPE, methodName, VIEW_TYPE, TypeId.BOOLEAN,
                        TypeId.INT, TypeId.INT, TypeId.INT, TypeId.INT);

        final MethodId<G, Void> methodId = generatedType.getMethod(VOID_TYPE, methodName,
                TypeId.BOOLEAN, TypeId.INT, TypeId.INT, TypeId.INT, TypeId.INT);
        final Code code = dexMaker.declare(methodId, PUBLIC);

        final Local<G> localThis = code.getThis(generatedType);
        final Local<Interceptor> nullInterceptor = code.newLocal(INTERCEPTOR_TYPE);
        final Local<Interceptor> localInterceptor = code.newLocal(INTERCEPTOR_TYPE);
        final Local<Boolean> localChanged = code.getParameter(0, TypeId.BOOLEAN);
        final Local<Integer> localLeft = code.getParameter(1, TypeId.INT);
        final Local<Integer> localTop = code.getParameter(2, TypeId.INT);
        final Local<Integer> localRight = code.getParameter(3, TypeId.INT);
        final Local<Integer> localBottom = code.getParameter(4, TypeId.INT);

        code.iget(interceptorField, localInterceptor, localThis);
        code.loadConstant(nullInterceptor, null);

        // Interceptor is not null, call it.
        final Label interceptorNullCase = new Label();
        code.compare(Comparison.EQ, interceptorNullCase, nullInterceptor, localInterceptor);
        code.invokeVirtual(onLayoutMethod, null, localInterceptor, localThis, localChanged,
                localLeft, localTop, localRight, localBottom);
        code.returnVoid();

        // Interceptor is null, call super method.
        code.mark(interceptorNullCase);
        code.invokeSuper(superMethod, null, localThis, localChanged, localLeft, localTop,
                localRight, localBottom);
        code.returnVoid();

        final MethodId<G, Void> callsSuperMethod = generatedType.getMethod(VOID_TYPE,
                ViewMethod.ON_LAYOUT.getInvokeName(), TypeId.BOOLEAN, TypeId.INT, TypeId.INT,
                TypeId.INT, TypeId.INT);

        final Code superCode = dexMaker.declare(callsSuperMethod, PUBLIC);

        final Local<G> superThis = superCode.getThis(generatedType);
        final Local<Boolean> superLocalChanged = superCode.getParameter(0, TypeId.BOOLEAN);
        final Local<Integer> superLocalLeft = superCode.getParameter(1, TypeId.INT);
        final Local<Integer> superLocalTop = superCode.getParameter(2, TypeId.INT);
        final Local<Integer> superLocalRight = superCode.getParameter(3, TypeId.INT);
        final Local<Integer> superLocalBottom = superCode.getParameter(4, TypeId.INT);
        superCode.invokeSuper(superMethod, null, superThis, superLocalChanged, superLocalLeft,
                superLocalTop, superLocalRight, superLocalBottom);
        superCode.returnVoid();
    }
803114
protected void initialize(SarlSkill source, JvmGenericType inferredJvmType) {
		// Issue #356: do not generate if the skill has no name.
		assert source != null;
		assert inferredJvmType != null;
		if (Strings.isNullOrEmpty(source.getName())) {
			return;
		}
		// Create the generation context that is used by the other transformation functions.
		final GenerationContext context = openContext(source, inferredJvmType, Arrays.asList(
				SarlField.class, SarlConstructor.class, SarlAction.class, SarlBehaviorUnit.class,
				SarlCapacityUses.class, SarlRequiredCapacity.class));
		try {
			// Copy the documentation
			this.typeBuilder.copyDocumentationTo(source, inferredJvmType);

			// Change the modifiers on the generated type.
			setVisibility(inferredJvmType, source);
			inferredJvmType.setStatic(false);
			final boolean isAbstract = source.isAbstract() || Utils.hasAbstractMember(source);
			inferredJvmType.setAbstract(isAbstract);
			inferredJvmType.setStrictFloatingPoint(false);
			inferredJvmType.setFinal(!isAbstract && source.isFinal());

			// Generate the annotations.
			translateAnnotationsTo(source.getAnnotations(), inferredJvmType);

			// Generate the extended types.
			appendConstrainedExtends(context, inferredJvmType, Skill.class, SarlSkill.class, source.getExtends());
			appendConstrainedImplements(context, inferredJvmType, Capacity.class, SarlCapacity.class, source.getImplements());

			// Issue #363: do not generate the skill if the SARL library is incompatible.
			if (Utils.isCompatibleSARLLibraryOnClasspath(this.typeReferences, source)) {
				// Generate the members of the generated type.
				appendAOPMembers(
						inferredJvmType,
						source,
						context);
			}

			// Add functions dedicated to comparisons (equals, hashCode, etc.)
			appendComparisonFunctions(context, source, inferredJvmType);

			// Add clone functions if the generated type is cloneable
			appendCloneFunctionIfCloneable(context, source, inferredJvmType);

			// Add the default constructors for the behavior, if not already added
			appendDefaultConstructors(source, inferredJvmType);

			// Add serialVersionUID field if the generated type is serializable
			appendSerialNumberIfSerializable(context, source, inferredJvmType);

			// Add the specification version of SARL
			appendSARLSpecificationVersion(context, source, inferredJvmType);

			// Add the type of SARL Element
			appendSARLElementType(source, inferredJvmType);

			// Resolving any name conflict with the generated JVM type
			this.nameClashResolver.resolveNameClashes(inferredJvmType);
		} finally {
			closeContext(context);
		}
	}
1239039
public static IdGenerator getIdGenerator(GenerationType generationType, String name,
			List<IdGenerator> idGeneratorList) {
		// fixed idGenerators
		IdGenerator idGen = getIdGeneratorByType(generationType);
		if (idGen != null)
			return idGen;
		if (StrUtils.isEmpty(name))
			return null;
		for (IdGenerator idGenerator : idGeneratorList) {
			if (generationType != null && name.equalsIgnoreCase(idGenerator.getIdGenName()))
				return idGenerator;
			if ((generationType == null || GenerationType.OTHER.equals(generationType))
					&& name.equalsIgnoreCase(idGenerator.getIdGenName()))
				return idGenerator;
		}
		return null;
	}
1130648
private void genOptFormalTypeParameters(
      List<? extends TypeParameterElement> typeParameters, StringBuilder sb) {
    if (!typeParameters.isEmpty()) {
      sb.append('<');
      for (TypeParameterElement typeParam : typeParameters) {
        genFormalTypeParameter(typeParam, sb);
      }
      sb.append('>');
    }
  }
303478
private void initComponents()//GEN-BEGIN:initComponents
    {
        java.awt.GridBagConstraints gridBagConstraints;

        jPanel1 = new javax.swing.JPanel();
        lblEnabled = new javax.swing.JLabel();
        cbEnabled = new javax.swing.JCheckBox();
        lblDisabledByParent = new javax.swing.JLabel();
        cbDisabledByParent = new javax.swing.JCheckBox();
        jLabel4 = new javax.swing.JLabel();
        jLabel3 = new javax.swing.JLabel();
        lblColumnName = new javax.swing.JLabel();
        tfColumnName = new javax.swing.JTextField();
        lblJavaFieldName = new javax.swing.JLabel();
        tfJavaFieldName = new javax.swing.JTextField();
        lblSQLTypeName = new javax.swing.JLabel();
        tfSQLTypeName = new javax.swing.JTextField();
        lblSQLType = new javax.swing.JLabel();
        cmbSQLType = new javax.swing.JComboBox();
        lblJavaType = new javax.swing.JLabel();
        cmbJavaType = new javax.swing.JComboBox();

        setLayout(new java.awt.GridBagLayout());

        addComponentListener(new java.awt.event.ComponentAdapter()
        {
            public void componentShown(java.awt.event.ComponentEvent evt)
            {
                formComponentShown(evt);
            }
            public void componentHidden(java.awt.event.ComponentEvent evt)
            {
                formComponentHidden(evt);
            }
        });

        addHierarchyListener(new java.awt.event.HierarchyListener()
        {
            public void hierarchyChanged(java.awt.event.HierarchyEvent evt)
            {
                formHierarchyChanged(evt);
            }
        });

        jPanel1.setLayout(new java.awt.GridLayout(8, 2));

        lblEnabled.setDisplayedMnemonic('e');
        lblEnabled.setText("enabled:");
        jPanel1.add(lblEnabled);

        cbEnabled.setMnemonic('e');
        cbEnabled.addActionListener(new java.awt.event.ActionListener()
        {
            public void actionPerformed(java.awt.event.ActionEvent evt)
            {
                cbEnabledActionPerformed(evt);
            }
        });

        jPanel1.add(cbEnabled);

        lblDisabledByParent.setText("disabled by Parent:");
        jPanel1.add(lblDisabledByParent);

        cbDisabledByParent.setMnemonic('d');
        cbDisabledByParent.setEnabled(false);
        jPanel1.add(cbDisabledByParent);

        jPanel1.add(jLabel4);

        jPanel1.add(jLabel3);

        lblColumnName.setLabelFor(tfColumnName);
        lblColumnName.setText("Column Name:");
        jPanel1.add(lblColumnName);

        tfColumnName.setEditable(false);
        tfColumnName.setText("jTextField1");
        tfColumnName.setBorder(null);
        tfColumnName.setDisabledTextColor((java.awt.Color) javax.swing.UIManager.getDefaults().get("windowText"));
        tfColumnName.setEnabled(false);
        jPanel1.add(tfColumnName);

        lblJavaFieldName.setLabelFor(tfColumnName);
        lblJavaFieldName.setText("Java Field Name:");
        jPanel1.add(lblJavaFieldName);

        tfJavaFieldName.setText("jTextField1");
        tfJavaFieldName.addActionListener(new java.awt.event.ActionListener()
        {
            public void actionPerformed(java.awt.event.ActionEvent evt)
            {
                tfJavaFieldNameActionPerformed(evt);
            }
        });

        tfJavaFieldName.addFocusListener(new java.awt.event.FocusAdapter()
        {
            public void focusLost(java.awt.event.FocusEvent evt)
            {
                tfJavaFieldNameFocusLost(evt);
            }
        });

        tfJavaFieldName.addKeyListener(new java.awt.event.KeyAdapter()
        {
            public void keyTyped(java.awt.event.KeyEvent evt)
            {
                tfJavaFieldNameKeyTyped(evt);
            }
        });

        jPanel1.add(tfJavaFieldName);

        lblSQLTypeName.setLabelFor(tfColumnName);
        lblSQLTypeName.setText("SQL Type Name:");
        jPanel1.add(lblSQLTypeName);

        tfSQLTypeName.setEditable(false);
        tfSQLTypeName.setText("jTextField1");
        tfSQLTypeName.setBorder(null);
        tfSQLTypeName.setDisabledTextColor((java.awt.Color) javax.swing.UIManager.getDefaults().get("windowText"));
        tfSQLTypeName.setEnabled(false);
        jPanel1.add(tfSQLTypeName);

        lblSQLType.setText("Java SQL Type:");
        jPanel1.add(lblSQLType);

        cmbSQLType.setModel(new javax.swing.DefaultComboBoxModel(Utilities.vJDBCTypeNames));
        cmbSQLType.addActionListener(new java.awt.event.ActionListener()
        {
            public void actionPerformed(java.awt.event.ActionEvent evt)
            {
                cmbSQLTypeActionPerformed(evt);
            }
        });

        jPanel1.add(cmbSQLType);

        lblJavaType.setText("Java Type:");
        jPanel1.add(lblJavaType);

        cmbJavaType.setEditable(true);
        cmbJavaType.setModel( new org.apache.ojb.tools.swing.SortingComboBoxModel(Utilities.vJavaTypes)
            /*new javax.swing.DefaultComboBoxModel(at.citec.ojb.schemegenerator.Utilities.vJavaTypes)*/);
        cmbJavaType.addActionListener(new java.awt.event.ActionListener()
        {
            public void actionPerformed(java.awt.event.ActionEvent evt)
            {
                cmbJavaTypeActionPerformed(evt);
            }
        });

        jPanel1.add(cmbJavaType);

        gridBagConstraints = new java.awt.GridBagConstraints();
        gridBagConstraints.fill = java.awt.GridBagConstraints.HORIZONTAL;
        gridBagConstraints.anchor = java.awt.GridBagConstraints.NORTH;
        gridBagConstraints.weightx = 1.0;
        gridBagConstraints.weighty = 1.0;
        add(jPanel1, gridBagConstraints);

    }
621637
private void initComponents()//GEN-BEGIN:initComponents
    {
        java.awt.GridBagConstraints gridBagConstraints;

        lblJDBCDriver = new javax.swing.JLabel();
        tfJDBCDriver = new javax.swing.JTextField();
        lblJDBCURL = new javax.swing.JLabel();
        tfJDBCURL = new javax.swing.JTextField();
        lblUsername = new javax.swing.JLabel();
        tfUsername = new javax.swing.JTextField();
        lblPassword = new javax.swing.JLabel();
        tfPassword = new javax.swing.JPasswordField();
        jPanel1 = new javax.swing.JPanel();
        pbCancel = new javax.swing.JButton();
        pbConnect = new javax.swing.JButton();

        getContentPane().setLayout(new java.awt.GridBagLayout());

        addWindowListener(new java.awt.event.WindowAdapter()
        {
            public void windowClosing(java.awt.event.WindowEvent evt)
            {
                closeDialog(evt);
            }
        });

        lblJDBCDriver.setText("JDBC Driver Class:");
        lblJDBCDriver.setLabelFor(tfJDBCDriver);
        gridBagConstraints = new java.awt.GridBagConstraints();
        gridBagConstraints.gridx = 0;
        gridBagConstraints.gridy = 0;
        gridBagConstraints.anchor = java.awt.GridBagConstraints.WEST;
        getContentPane().add(lblJDBCDriver, gridBagConstraints);

        tfJDBCDriver.setText("jTextField1");
        gridBagConstraints = new java.awt.GridBagConstraints();
        gridBagConstraints.gridx = 1;
        gridBagConstraints.gridy = 0;
        gridBagConstraints.fill = java.awt.GridBagConstraints.HORIZONTAL;
        gridBagConstraints.weightx = 1.0;
        getContentPane().add(tfJDBCDriver, gridBagConstraints);

        lblJDBCURL.setText("JDBC URL:");
        gridBagConstraints = new java.awt.GridBagConstraints();
        gridBagConstraints.gridx = 0;
        gridBagConstraints.gridy = 1;
        gridBagConstraints.anchor = java.awt.GridBagConstraints.WEST;
        getContentPane().add(lblJDBCURL, gridBagConstraints);

        tfJDBCURL.setColumns(40);
        tfJDBCURL.setText("jTextField2");
        gridBagConstraints = new java.awt.GridBagConstraints();
        gridBagConstraints.gridx = 1;
        gridBagConstraints.gridy = 1;
        gridBagConstraints.fill = java.awt.GridBagConstraints.HORIZONTAL;
        gridBagConstraints.weightx = 1.0;
        getContentPane().add(tfJDBCURL, gridBagConstraints);

        lblUsername.setText("Username:");
        gridBagConstraints = new java.awt.GridBagConstraints();
        gridBagConstraints.gridx = 0;
        gridBagConstraints.gridy = 2;
        gridBagConstraints.anchor = java.awt.GridBagConstraints.WEST;
        getContentPane().add(lblUsername, gridBagConstraints);

        tfUsername.setText("jTextField3");
        gridBagConstraints = new java.awt.GridBagConstraints();
        gridBagConstraints.gridx = 1;
        gridBagConstraints.gridy = 2;
        gridBagConstraints.fill = java.awt.GridBagConstraints.HORIZONTAL;
        gridBagConstraints.weightx = 1.0;
        getContentPane().add(tfUsername, gridBagConstraints);

        lblPassword.setText("Password:");
        gridBagConstraints = new java.awt.GridBagConstraints();
        gridBagConstraints.gridx = 0;
        gridBagConstraints.gridy = 3;
        gridBagConstraints.anchor = java.awt.GridBagConstraints.WEST;
        getContentPane().add(lblPassword, gridBagConstraints);

        gridBagConstraints = new java.awt.GridBagConstraints();
        gridBagConstraints.gridx = 1;
        gridBagConstraints.gridy = 3;
        gridBagConstraints.fill = java.awt.GridBagConstraints.HORIZONTAL;
        gridBagConstraints.weightx = 1.0;
        getContentPane().add(tfPassword, gridBagConstraints);

        pbCancel.setText("Cancel");
        pbCancel.addActionListener(new java.awt.event.ActionListener()
        {
            public void actionPerformed(java.awt.event.ActionEvent evt)
            {
                pbCancelActionPerformed(evt);
            }
        });

        jPanel1.add(pbCancel);

        pbConnect.setText("Connect");
        pbConnect.addActionListener(new java.awt.event.ActionListener()
        {
            public void actionPerformed(java.awt.event.ActionEvent evt)
            {
                pbConnectActionPerformed(evt);
            }
        });

        jPanel1.add(pbConnect);

        gridBagConstraints = new java.awt.GridBagConstraints();
        gridBagConstraints.gridx = 1;
        gridBagConstraints.gridy = 4;
        gridBagConstraints.anchor = java.awt.GridBagConstraints.EAST;
        getContentPane().add(jPanel1, gridBagConstraints);

        pack();
    }
521172
private void jButtonApplyActionPerformed(java.awt.event.ActionEvent evt) {//GEN-FIRST:event_jButtonApplyActionPerformed
        parent.setText(getParamsString());
        getAssociatedDialog().dispose();
    }
313462
@Nonnull
  public JSFormatter generatable (@Nonnull final Iterable <? extends IJSGeneratable> aCont)
  {
    boolean bFirst = true;
    for (final IJSGeneratable aItem : aCont)
    {
      if (bFirst)
        bFirst = false;
      else
        plain (',');
      generatable (aItem);
    }
    return this;
  }
56474
private void cmdAddActionPerformed(java.awt.event.ActionEvent evt) {// GEN-FIRST:event_cmdAddActionPerformed
		Object item = cboPropertyAutoSuggest.getSelectedItem();
		addPredicateProperty(item);
		validatePredicateProperty();
	}
152027
protected static void pushTypeArguments(GeneratorAdapter generatorAdapter, Map<String, Object> types) {
        if (types == null || types.isEmpty()) {
            generatorAdapter.visitInsn(ACONST_NULL);
            return;
        }
        int len = types.size();
        // Build calls to Argument.create(...)
        pushNewArray(generatorAdapter, Argument.class, len);
        int i = 0;
        for (Map.Entry<String, Object> entry : types.entrySet()) {
            // the array index
            generatorAdapter.push(i);
            String typeParameterName = entry.getKey();
            Object value = entry.getValue();
            if (value instanceof Map) {
                buildArgumentWithGenerics(generatorAdapter, typeParameterName, (Map) value);
            } else {
                buildArgument(generatorAdapter, typeParameterName, value);
            }

            // store the type reference
            generatorAdapter.visitInsn(AASTORE);
            // if we are not at the end of the array duplicate array onto the stack
            if (i != (len - 1)) {
                generatorAdapter.visitInsn(DUP);
            }
            i++;
        }
    }
453014
private void generateBuilderClass() {
        if (data.isSkipBuilderGeneration()) {
            return;
        }
        List<PropertyGen> nonDerived = nonDerivedProperties();
        generateSeparator();
        String finalType = data.isTypeFinal() ? "final " : "";
        addLine(1, "/**");
        addLine(1, " * The bean-builder for {@code " + data.getTypeRaw() + "}.");
        if (data.isTypeGeneric()) {
            for (int j = 0; j < data.getTypeGenericCount(); j++) {
                addLine(1, " * @param " + data.getTypeGenericName(j, true) + "  the type");
            }
        }
        addLine(1, " */");
        String superBuilder;
        if (data.isSubClass()) {
            superBuilder = data.getSuperTypeRaw() + ".Builder" + data.getSuperTypeGeneric(true);
        } else if (data.isEffectiveBuilderScopeVisible()) {
            data.ensureImport(DirectFieldsBeanBuilder.class);
            superBuilder = "DirectFieldsBeanBuilder<" + data.getTypeNoExtends() + ">";
        } else {
            data.ensureImport(DirectPrivateBeanBuilder.class);
            superBuilder = "DirectPrivateBeanBuilder<" + data.getTypeNoExtends() + ">";
        }
        if (data.isConstructable()) {
            addLine(1, data.getEffectiveBuilderScope() + "static " + finalType +
                    "class Builder" + data.getTypeGeneric(true) + " extends " + superBuilder + " {");
        } else {
            addLine(1, data.getEffectiveBuilderScope() + "abstract static " + finalType +
                    "class Builder" + data.getTypeGeneric(true) + " extends " + superBuilder + " {");
        }
        if (nonDerived.size() > 0) {
            addBlankLine();
            generateBuilderProperties();
        }
        addBlankLine();
        generateBuilderConstructorNoArgs();
        generateBuilderConstructorCopy();
        generateIndentedSeparator();
        generateBuilderGet();
        generateBuilderSet();
        generateBuilderOtherSets();
        if (data.isConstructable()) {
            generateBuilderBuild();
        }
        generateIndentedSeparator();
        generateBuilderPropertySetMethods();
        generateIndentedSeparator();
        generateBuilderToString();
        addLine(1, "}");
        addBlankLine();
    }
16920
@SuppressWarnings("unchecked")
    public static <T> T generateObject(final IGenerator generator,
                                       final Class<T> fieldType) {
        if(generator == null)
            return null;

        final Object object = generator.generate();
        return castObject(object, fieldType);
    }
638789
private void generateDaoPart(M2MEntity entity) {
		String daoClassName = entity.daoName.simpleName();

		String daoPackageName = entity.daoName.packageName();
		String entityPackageName = entity.getPackageName();
		String generatedDaoClassName = "Generated" + daoClassName;

		AnnotationProcessorUtilis.infoOnGeneratedClasses(BindDaoMany2Many.class, daoPackageName, generatedDaoClassName);
		// @formatter:off
		classBuilder = TypeSpec.interfaceBuilder(generatedDaoClassName).addModifiers(Modifier.PUBLIC)
				.addAnnotation(AnnotationSpec.builder(BindDao.class)
						.addMember("value", "$T.class", TypeUtility.className(entityPackageName, entity.name)).build())
				.addAnnotation(AnnotationSpec.builder(BindGeneratedDao.class)
						.addMember("dao", "$T.class", entity.daoName).build())
				.addAnnotation(AnnotationSpec.builder(BindDaoMany2Many.class)
						.addMember("entity1", "$T.class", entity.entity1Name)
						.addMember("entity2", "$T.class", entity.entity2Name).build())
				.addSuperinterface(entity.daoName);
		// @formatter:on

		JavadocUtility.generateJavadocGeneratedBy(classBuilder);

		if (entity.generateMethods) {
			generateSelects(entity, entityPackageName);
			generateDeletes(entity, entityPackageName);
			generateInsert(entity, entityPackageName);
		}

		TypeSpec typeSpec = classBuilder.build();

		try {
			JavaWriterHelper.writeJava2File(filer, daoPackageName, typeSpec);
		} catch (IOException e) {
			throw new KriptonRuntimeException(e);
		}

		GeneratedTypeElement daoPartElement = new GeneratedTypeElement(daoPackageName, classBuilder.build(), null,
				null);
		daoResult.add(daoPartElement);
	}
1373778
public Datatype.Builder setGeneratedBuilder(TypeClass generatedBuilder) {
    this.generatedBuilder = Objects.requireNonNull(generatedBuilder);
    _unsetProperties.remove(Property.GENERATED_BUILDER);
    return (Datatype.Builder) this;
  }