private String extractDeclarations(Match match) {
        final StringBuilder result = new StringBuilder();
        List<String> declarations = match.getDeclarationIds();
        Map<String, Declaration> declsMap = ( (AgendaItem) match ).getTerminalNode().getSubRule().getOuterDeclarations();
        for ( int i = 0; i < declarations.size(); i++ ) {
            String declaration = declarations.get(i);

            Declaration decl = declsMap.get(declaration);
            InternalFactHandle handle = ( (Tuple) match ).get( decl );
            if (!handle.isValid()) {
                continue;
            }
            Object value = decl.getValue(null, handle.getObject());

            result.append( declaration );
            result.append( "=" );
            if ( value == null ) {
                // this should never occur
                result.append( "null" );
            } else {
                result.append( value );
            }
            if ( i < declarations.size() - 1 ) {
                result.append( "; " );
            }
        }
        return result.toString();
    }
private String extractDeclarations ( Match match ) { final StringBuilder result = new StringBuilder ( ) ; List < String > declarations = match . getDeclarationIds ( ) ; Map < String , Declaration > declsMap = ( ( AgendaItem ) match ) . getTerminalNode ( ) . getSubRule ( ) . getOuterDeclarations ( ) ; for ( int i = 0 ; i < declarations . size ( ) ; i ++ ) { String declaration = declarations . get ( i ) ; Declaration decl = declsMap . get ( declaration ) ; InternalFactHandle handle = ( ( Tuple ) match ) . get ( decl ) ; if ( ! handle . isValid ( ) ) { continue ; } Object value = decl . getValue ( null , handle . getObject ( ) ) ; result . append ( declaration ) ; result . append ( "=" ) ; if ( value == null ) { result . append ( "null" ) ; } else { result . append ( value ) ; } if ( i < declarations . size ( ) - 1 ) { result . append ( "; " ) ; } } return result . toString ( ) ; }
Creates a string representation of the declarations of an activation.
This is a list of name-value-pairs for each of the declarations in the
tuple of the activation.  The name is the identifier (=name) of the
declaration, and the value is a toString of the value of the
parameter, followed by the id of the fact between parentheses.

@param match The match from which the declarations should be extracted
@return A String represetation of the declarations of the activation.