public Properties generate ( Properties instructions , ProjectDependencies dependencies ) { Properties result = new Properties ( ) ; result . putAll ( instructions ) ; StringBuilder include = new StringBuilder ( ) ; if ( instructions . getProperty ( Constants . INCLUDE_RESOURCE ) != null ) { include . append ( instructions . getProperty ( Constants . INCLUDE_RESOURCE ) ) ; } StringBuilder classpath = new StringBuilder ( ) ; final String originalClassPath = instructions . getProperty ( Constants . BUNDLE_CLASSPATH ) ; if ( originalClassPath != null ) { classpath . append ( originalClassPath ) ; } for ( EmbeddedDependency configuration : embedded ) { configuration . addClause ( dependencies , include , classpath , reporter ) ; } if ( include . length ( ) != 0 ) { result . setProperty ( Constants . INCLUDE_RESOURCE , include . toString ( ) ) ; } if ( classpath . length ( ) != 0 ) { if ( originalClassPath != null ) { result . setProperty ( Constants . BUNDLE_CLASSPATH , classpath . toString ( ) ) ; } else { // Prepend . to the classpath. result . setProperty ( Constants . BUNDLE_CLASSPATH , "., " + classpath . toString ( ) ) ; } } return result ; }
Generates the new set of instruction containing the original set of instructions enhanced with the embed dependencies results .