Declares the fields produced by this bolt.


@param declarer
185415
@Override
    public void declareOutputFields(OutputFieldsDeclarer declarer) {
        if (this.isDrpc) {
            declarer.declare(new Fields("id", this.emitFieldForRowKey, this.emitFieldForColumnName));
        } else {
            declarer.declare(new Fields(this.emitFieldForRowKey, this.emitFieldForColumnName));
        }
    }
740707
public void defineConstantField(int modifier, String fieldName, int constant)
    {
        DeclaredType dt = (DeclaredType)asType();
        VariableBuilder builder = new VariableBuilder(this, fieldName, dt.getTypeArguments(), typeParameterMap);
        builder.addModifiers(modifier);
        builder.addModifier(Modifier.STATIC);
        builder.setType(Typ.IntA);
        FieldInfo fieldInfo = new FieldInfo(this, builder.getVariableElement(), new ConstantValue(this, constant));
        addFieldInfo(fieldInfo);
        fieldInfo.readyToWrite();
    }
1204573
protected void setFieldSeparator(String fieldSeparator) {
        if (fieldSeparator == null) {
            fieldSeparator = StringUtils.EMPTY;
        }
        this.fieldSeparator = fieldSeparator;
    }
1369501
public void setupFields()
    {
        FieldInfo field = null;
        field = new FieldInfo(this, ID, Constants.DEFAULT_FIELD_LENGTH, null, null);
        field.setDataClass(Integer.class);
        field.setHidden(true);
        field = new FieldInfo(this, LAST_CHANGED, Constants.DEFAULT_FIELD_LENGTH, null, null);
        field.setDataClass(Date.class);
        field.setHidden(true);
        field = new FieldInfo(this, DELETED, 10, null, new Boolean(false));
        field.setDataClass(Boolean.class);
        field.setHidden(true);
        field = new FieldInfo(this, DESCRIPTION, Constants.DEFAULT_FIELD_LENGTH, null, null);
        field = new FieldInfo(this, PROJECT_ID, Constants.DEFAULT_FIELD_LENGTH, null, null);
        field.setDataClass(Integer.class);
        field = new FieldInfo(this, USER_ID, Constants.DEFAULT_FIELD_LENGTH, null, null);
        field.setDataClass(Integer.class);
        field = new FieldInfo(this, CLOSED, 10, null, new Boolean(false));
        field.setDataClass(Boolean.class);
        field = new FieldInfo(this, DUE_DATE, 12, null, null);
        field.setDataClass(Date.class);
        field.setScale(Constants.DATE_ONLY);
    }
1310851
private void ensureBuilders() {
    if (this.builders == null) {
      this.builders = new ArrayList<SingleFieldBuilder<MType, BType, IType>>(messages.size());
      for (int i = 0; i < messages.size(); i++) {
        builders.add(null);
      }
    }
  }
271739
public void setupFields()
    {
        FieldInfo field = null;
        field = new FieldInfo(this, ID, Constants.DEFAULT_FIELD_LENGTH, null, null);
        field.setDataClass(Integer.class);
        field.setHidden(true);
        field = new FieldInfo(this, LAST_CHANGED, Constants.DEFAULT_FIELD_LENGTH, null, null);
        field.setDataClass(Date.class);
        field.setHidden(true);
        field = new FieldInfo(this, DELETED, 10, null, new Boolean(false));
        field.setDataClass(Boolean.class);
        field.setHidden(true);
        field = new FieldInfo(this, NAME, 50, null, null);
        field = new FieldInfo(this, PARENT_FOLDER_ID, Constants.DEFAULT_FIELD_LENGTH, null, null);
        field.setDataClass(Integer.class);
        field = new FieldInfo(this, SEQUENCE, 5, null, new Short((short)0));
        field.setDataClass(Short.class);
        field = new FieldInfo(this, COMMENT, Constants.DEFAULT_FIELD_LENGTH, null, null);
        field = new FieldInfo(this, CODE, 30, null, null);
        field = new FieldInfo(this, TYPE, 10, null, null);
        field = new FieldInfo(this, AUTO_DESC, 10, null, new Boolean(true));
        field.setDataClass(Boolean.class);
        field = new FieldInfo(this, PROGRAM, 255, null, null);
        field = new FieldInfo(this, PARAMS, Constants.DEFAULT_FIELD_LENGTH, null, null);
        field = new FieldInfo(this, ICON_RESOURCE, 255, null, null);
        field = new FieldInfo(this, KEYWORDS, 50, null, null);
        field = new FieldInfo(this, XML_DATA, Constants.DEFAULT_FIELD_LENGTH, null, null);
        field = new FieldInfo(this, MENUS_HELP, Constants.DEFAULT_FIELD_LENGTH, null, null);
    }
1362616
private static void collectFields(Class<?> type, List<Field> fields) {
        final Field[] declaredFields = type.getDeclaredFields();
        for (Field declaredField : declaredFields) {
            if (isPersistable(declaredField)) {
                fields.add(declaredField);
            }
        }
        if (type.getSuperclass() != null) {
            collectFields(type.getSuperclass(), fields);
        }
    }
670380
public void declareVariables(Variable[] vars) {
        for (int i=0; i<vars.length; i++) {
            vars[i] = declareVariable(vars[i]);
        }
    }
1370761
private <X> void onDeclaredFields(Class<X> clazz, AbstractManagedType<X> managedType)
    {
        Field[] embeddedFields = clazz.getDeclaredFields();
        for (Field f : embeddedFields)
        {
            if (isNonTransient(f))
            {
                new TypeBuilder<T>(f).build(managedType, f.getType());
            }
        }
    }
800234
public void setupFields()
    {
        FieldInfo field = null;
        field = new FieldInfo(this, ID, Constants.DEFAULT_FIELD_LENGTH, null, null);
        field.setDataClass(Integer.class);
        field.setHidden(true);
        field = new FieldInfo(this, LAST_CHANGED, Constants.DEFAULT_FIELD_LENGTH, null, null);
        field.setDataClass(Date.class);
        field.setHidden(true);
        field = new FieldInfo(this, DELETED, 10, null, new Boolean(false));
        field.setDataClass(Boolean.class);
        field.setHidden(true);
        field = new FieldInfo(this, PROJECT_NAME, 30, null, null);
        field = new FieldInfo(this, BASE_DIRECTORY, 100, null, null);
        field = new FieldInfo(this, SOURCE_DIRECTORY, 100, null, "src/main/java/");
        field = new FieldInfo(this, RESOURCES_DIRECTORY, 100, null, "src/main/resources/");
        field = new FieldInfo(this, CLASS_DIRECTORY, 100, null, "target/classes/");
        field = new FieldInfo(this, ARCHIVE_DIRECTORY, 127, null, null);
        field = new FieldInfo(this, DEV_ARCHIVE_DIRECTORY, 127, null, null);
        field = new FieldInfo(this, RESOURCE_TYPE, Constants.DEFAULT_FIELD_LENGTH, null, null);
        field = new FieldInfo(this, CLASS_RESOURCE_TYPE, Constants.DEFAULT_FIELD_LENGTH, null, null);
        field = new FieldInfo(this, PACKAGE_NAME, 40, null, null);
        field = new FieldInfo(this, INTERFACE_PACKAGE, Constants.DEFAULT_FIELD_LENGTH, null, null);
        field = new FieldInfo(this, THIN_PACKAGE, 40, null, null);
        field = new FieldInfo(this, RESOURCE_PACKAGE, 40, null, null);
        field = new FieldInfo(this, LAST_PACKAGE_UPDATE, 25, null, null);
        field.setDataClass(Date.class);
        field = new FieldInfo(this, PACKAGES_BASE_PATH, 100, null, null);
        field = new FieldInfo(this, PACKAGES_PATH, 100, null, null);
    }
91084
public void setupFields()
    {
        FieldInfo field = null;
        field = new FieldInfo(this, ID, Constants.DEFAULT_FIELD_LENGTH, null, null);
        field.setDataClass(Integer.class);
        field.setHidden(true);
        field = new FieldInfo(this, LAST_CHANGED, Constants.DEFAULT_FIELD_LENGTH, null, null);
        field.setDataClass(Date.class);
        field.setHidden(true);
        field = new FieldInfo(this, DELETED, 10, null, new Boolean(false));
        field.setDataClass(Boolean.class);
        field.setHidden(true);
        field = new FieldInfo(this, CLASS_NAME, 40, null, null);
        field = new FieldInfo(this, BASE_CLASS_NAME, 40, null, null);
        field = new FieldInfo(this, CLASS_DESC, 255, null, null);
        field = new FieldInfo(this, CLASS_PROJECT_ID, Constants.DEFAULT_FIELD_LENGTH, null, null);
        field.setDataClass(Integer.class);
        field = new FieldInfo(this, CLASS_PACKAGE, 60, null, null);
        field = new FieldInfo(this, CLASS_SOURCE_FILE, 40, null, null);
        field = new FieldInfo(this, CLASS_TYPE, 20, null, null);
        field = new FieldInfo(this, CLASS_EXPLAIN, Constants.DEFAULT_FIELD_LENGTH, null, null);
        field = new FieldInfo(this, CLASS_HELP, Constants.DEFAULT_FIELD_LENGTH, null, null);
        field = new FieldInfo(this, CLASS_IMPLEMENTS, 60, null, null);
        field = new FieldInfo(this, SEE_ALSO, 32000, null, null);
        field = new FieldInfo(this, TECHNICAL_INFO, 32000, null, null);
        field = new FieldInfo(this, COPY_DESC_FROM, 50, null, null);
    }
861984
private void enumerative( EnumDeclarationDescrBuilder declare ) {
        EnumLiteralDescrBuilder literal = null;
        String lit = null;
        try {
            Token enumLit = match( input,
                    DRL5Lexer.ID,
                    null,
                    null,
                    DroolsEditorType.IDENTIFIER );
            lit = enumLit.getText();
            if ( state.failed ) return;
        } catch ( RecognitionException re ) {
            reportError( re );
        }

        try {
            literal = helper.start( declare,
                    EnumLiteralDescrBuilder.class,
                    lit );

            if ( input.LA( 1 ) == DRL5Lexer.LEFT_PAREN ) {

                match( input,
                        DRL5Lexer.LEFT_PAREN,
                        null,
                        null,
                        DroolsEditorType.SYMBOL );
                if ( state.failed ) return;

                boolean more;
                
                do {
                    int first = input.index();
                    exprParser.conditionalExpression();
                    if ( state.failed ) return;
                    if ( state.backtracking == 0 && input.index() > first ) {
                        // expression consumed something
                        String arg = input.toString( first,
                                input.LT( -1 ).getTokenIndex() );
                        literal.constructorArg( arg );
                    }
                    more = input.LA( 1 ) == DRL5Lexer.COMMA;
                    if ( more ) {
                        match( input,
                                DRL5Lexer.COMMA,
                                null,
                                null,
                                DroolsEditorType.SYMBOL );

                    }
                    
                } while ( more );

                match( input,
                        DRL5Lexer.RIGHT_PAREN,
                        null,
                        null,
                        DroolsEditorType.SYMBOL );
                if ( state.failed ) return;


            }


        } catch ( RecognitionException re ) {
            reportError( re );
        } finally {
            helper.end( FieldDescrBuilder.class,
                    literal );
        }
    }
870886
public void setupFields()
    {
        FieldInfo field = null;
        field = new FieldInfo(this, ID, Constants.DEFAULT_FIELD_LENGTH, null, null);
        field.setDataClass(Integer.class);
        field.setHidden(true);
        field = new FieldInfo(this, LAST_CHANGED, Constants.DEFAULT_FIELD_LENGTH, null, null);
        field.setDataClass(Date.class);
        field.setHidden(true);
        field = new FieldInfo(this, DELETED, 10, null, new Boolean(false));
        field.setDataClass(Boolean.class);
        field.setHidden(true);
        field = new FieldInfo(this, START_DATE_TIME, 25, null, null);
        field.setDataClass(Date.class);
        field = new FieldInfo(this, END_DATE_TIME, 25, null, null);
        field.setDataClass(Date.class);
        field = new FieldInfo(this, DESCRIPTION, 60, null, null);
        field = new FieldInfo(this, REPEAT_INTERVAL_ID, Constants.DEFAULT_FIELD_LENGTH, null, null);
        field.setDataClass(Integer.class);
        field = new FieldInfo(this, REPEAT_COUNT, 5, null, null);
        field.setDataClass(Short.class);
        field = new FieldInfo(this, CALENDAR_CATEGORY_ID, Constants.DEFAULT_FIELD_LENGTH, null, null);
        field.setDataClass(Integer.class);
        field = new FieldInfo(this, HIDDEN, 10, null, new Boolean(false));
        field.setDataClass(Boolean.class);
        field = new FieldInfo(this, PROPERTIES, Constants.DEFAULT_FIELD_LENGTH, null, null);
    }
27400
private void initAnnotatedFields() {
        final Set<Field> hiddenFields = Reflections.getHiddenFields(beanClass);
        inject(hiddenFields);

        final Set<Field> inheritedFields = Reflections.getInheritedFields(beanClass);
        inject(inheritedFields);

        final Set<Field> ownFields = Reflections.getOwnFields(beanClass);
        inject(ownFields);
    }
490742
private void writeFields(String objectName, FieldContainer container, FieldType[] fields) throws IOException
   {
      m_writer.writeStartObject(objectName);
      for (FieldType field : fields)
      {
         Object value = container.getCurrentValue(field);
         if (value != null)
         {
            writeField(field, value);
         }
      }
      m_writer.writeEndObject();
   }
95022
private void field(AbstractClassTypeDeclarationBuilder declare) {
        FieldDescrBuilder field = null;
        String fname = null;
        try {
            fname = label(DroolsEditorType.IDENTIFIER);
            if (state.failed)
                return;
        } catch (RecognitionException re) {
            reportError(re);
        }

        try {
            field = helper.start(declare,
                    FieldDescrBuilder.class,
                    fname);

            // type
            String type = type();
            if (state.failed)
                return;
            if (state.backtracking == 0)
                field.type(type);

            if (input.LA(1) == DRL6Lexer.EQUALS_ASSIGN) {
                // EQUALS_ASSIGN
                match(input,
                        DRL6Lexer.EQUALS_ASSIGN,
                        null,
                        null,
                        DroolsEditorType.SYMBOL);
                if (state.failed)
                    return;

                int first = input.index();
                exprParser.conditionalExpression();
                if (state.failed)
                    return;
                if (state.backtracking == 0 && input.index() > first) {
                    // expression consumed something
                    String value = input.toString(first,
                            input.LT(-1).getTokenIndex());
                    field.initialValue(value);
                }
            }

            while (input.LA(1) == DRL6Lexer.AT) {
                // annotation*
                annotation(field);
                if (state.failed)
                    return;
            }

            if (input.LA(1) == DRL6Lexer.SEMICOLON) {
                match(input,
                        DRL6Lexer.SEMICOLON,
                        null,
                        null,
                        DroolsEditorType.SYMBOL);
                if (state.failed)
                    return;
            }

        } catch (RecognitionException re) {
            reportError(re);
        } finally {
            helper.end(FieldDescrBuilder.class,
                    field);
        }
    }
278785
public BaseDescr declare( PackageDescrBuilder pkg ) throws RecognitionException {
        BaseDescr declaration = null;
        try {
            DeclareDescrBuilder declare = helper.start( pkg,
                                                        DeclareDescrBuilder.class,
                                                        null );

            // 'declare'
            match( input,
                   DRL5Lexer.ID,
                   DroolsSoftKeywords.DECLARE,
                   null,
                   DroolsEditorType.KEYWORD );
            if ( state.failed ) return null;
            
            if ( helper.validateIdentifierKey( DroolsSoftKeywords.ENTRY ) ) {
                // entry point declaration
                declaration = entryPointDeclaration( declare );
            } else if( helper.validateIdentifierKey( DroolsSoftKeywords.WINDOW ) ) {
                // window declaration
                declaration = windowDeclaration( declare );
            } else if ( helper.validateIdentifierKey( DroolsSoftKeywords.TRAIT ) ) {
                // trait type declaration
                // 'trait'
                match( input,
                       DRL5Lexer.ID,
                       DroolsSoftKeywords.TRAIT,
                       null,
                       DroolsEditorType.KEYWORD );
                if ( state.failed ) return null;

                declaration = typeDeclaration( declare, true );
            } else if ( helper.validateIdentifierKey( DroolsSoftKeywords.ENUM ) ) {
                match( input,
                        DRL5Lexer.ID,
                        DroolsSoftKeywords.ENUM,
                        null,
                        DroolsEditorType.KEYWORD );
                if ( state.failed ) return null;

                declaration = enumDeclaration( declare );
            } else {
                // class type declaration
                declaration = typeDeclaration( declare, false );
            }

        } catch ( RecognitionException re ) {
            reportError( re );
        }
        return declaration;
    }