Examples of FieldData


Examples of org.drools.workbench.models.testscenarios.shared.FieldData

    @Test
    public void testDummyRunNoRules() throws Exception {
        typeResolver.addImport( "org.drools.workbench.models.testscenarios.backend.Cheese" );

        List<Field> fieldData = new ArrayList<Field>();
        fieldData.add( new FieldData( "type",
                                      "cheddar" ) );
        fieldData.add( new FieldData( "price",
                                      "42" ) );
        FactData fact = new FactData( "Cheese",
                                      "c1",
                                      fieldData,
                                      false );
View Full Code Here

Examples of org.drools.workbench.models.testscenarios.shared.FieldData

                    fact.getType() );
            widget.setWidget( fieldRowIndex,
                              col,
                              editableCell );
            if ( field instanceof FieldData ) {
                FieldData fieldData = (FieldData) field;
                if ( fieldData.getNature() == FieldData.TYPE_ENUM ) {
                    enumEditorMap.put( fieldData, (FieldDataConstraintEditor) editableCell );
                }
            }
        }
        for ( FieldDataConstraintEditor outerEnumEditor : enumEditorMap.values() ) {
View Full Code Here

Examples of org.drools.workbench.models.testscenarios.shared.FieldData

        model.setName( name );

        model.getFixtures().add( new FactData( "Applicant",
                                               "$a",
                                               new ArrayList<Field>() {{
                                                   add( new FieldData( "age",
                                                                       "33" ) );
                                               }},
                                               false ) );
        model.getFixtures().add( new VerifyFact( "Mortgage",
                                                 new ArrayList<VerifyField>() {{
View Full Code Here

Examples of org.drools.workbench.models.testscenarios.shared.FieldData

        model.setName( name );

        model.getFixtures().add( new FactData( "Applicant",
                                               "$a",
                                               new ArrayList<Field>() {{
                                                   add( new FieldData( "age",
                                                                       "33" ) );
                                               }},
                                               false ) );

        return model;
View Full Code Here

Examples of org.drools.workbench.models.testscenarios.shared.FieldData

    DropDownData getEnums() {
        Map<String, String> currentValueMap = new HashMap<String, String>();
        for ( Field f : fact.getFieldData() ) {
            if ( f instanceof FieldData ) {
                FieldData otherFieldData = (FieldData) f;
                currentValueMap.put( otherFieldData.getName(),
                                     otherFieldData.getValue() );
            }
        }
        return oracle.getEnums(
                factType,
                field.getName(),
View Full Code Here

Examples of org.elasticsearch.index.field.data.FieldData

    }

    @Override public long sizeInBytes(String fieldName) {
        long sizeInBytes = 0;
        for (ConcurrentMap<String, FieldData> map : cache.values()) {
            FieldData fieldData = map.get(fieldName);
            if (fieldData != null) {
                sizeInBytes += fieldData.sizeInBytes();
            }
        }
        return sizeInBytes;
    }
View Full Code Here

Examples of org.fakereplace.data.FieldData

        // is exactly compatible with the old class, otherwise an
        // IncompatibleClassChange exception will be thrown

        while (it.hasNext()) {
            FieldInfo m = (FieldInfo) it.next();
            FieldData md = null;
            for (FieldData i : fields) {
                if (i.getName().equals(m.getName()) && i.getType().equals(m.getDescriptor()) && i.getAccessFlags() == m.getAccessFlags()) {
                    try {
                        Field field = i.getField(oldClass);
                        AnnotationDataStore.recordFieldAnnotations(field, (AnnotationsAttribute) m.getAttribute(AnnotationsAttribute.visibleTag));
                        // now revert the annotations:
                        m.addAttribute(AnnotationReplacer.duplicateAnnotationsAttribute(file.getConstPool(), field));
                    } catch (Exception e) {
                        throw new RuntimeException(e);
                    }
                    md = i;
                    break;
                } else if (i.getName().equals(m.getName()) && i.getType().equals(m.getDescriptor())) {
                    // we have a field whoes access modifiers have changed.
                    if ((i.getAccessFlags() | AccessFlag.STATIC) == (m.getAccessFlags() | AccessFlag.STATIC)) {
                        // change from / to static can be handled fine
                    }
                }
            }
            // This is a newly added field.
            if (md == null) {
                if ((m.getAccessFlags() & AccessFlag.STATIC) != 0) {
                    addStaticField(file, loader, m, builder, oldClass);
                } else {
                    int fieldNo = addInstanceField(file, loader, m, builder, oldClass);
                    addedFields.add(new AddedFieldData(fieldNo, m.getName(), m.getDescriptor(), file.getName(), loader));
                    noAddedFields++;
                }
                it.remove();
            } else {
                fields.remove(md);
            }
        }
        // these fields have been removed,
        // TODO: rewrite classes that access them to throw a NoSuchFieldError
        for (FieldData md : fields) {
            if (md.getMemberType() == MemberType.NORMAL) {
                FieldInfo old = new FieldInfo(file.getConstPool(), md.getName(), md.getType());
                old.setAccessFlags(md.getAccessFlags());
                builder.removeField(md);
                try {
                    Field field = md.getField(oldClass);
                    file.addField(old);
                    old.addAttribute(AnnotationReplacer.duplicateAnnotationsAttribute(file.getConstPool(), field));
                } catch (DuplicateMemberException e) {
                    // this should not happen
                    throw new RuntimeException(e);
View Full Code Here

Examples of org.locationtech.udig.omsbox.core.FieldData

        // the scroller gets the control of the tab item
        tab.setControl(scroller);

        int[] row = new int[]{0};
        for( int j = 0; j < inputsList.size(); j++ ) {
            FieldData inputData = inputsList.get(j);
            if (hideComplex && !inputData.isSimpleType() && !OmsBoxUtils.isFieldExceptional(inputData)) {
                continue;
            }

            // remove region related widgets, if the user chose to not have them.
            if (inputData.isProcessingRegionRelated() && OmsBoxPlugin.getDefault().doIgnoreProcessingRegion()) {
                continue;
            }

            List<ModuleGuiElement> inputList = formGuiFactory.createInputGui(inputData, row);
            for( ModuleGuiElement moduleGuiElement : inputList ) {
View Full Code Here
TOP
Copyright © 2018 www.massapi.com. All rights reserved.
All source code are property of their respective owners. Java is a trademark of Sun Microsystems, Inc and owned by ORACLE Inc. Contact coftware#gmail.com.