@Test public void testFindAllExportedVariables_withComponentExtension() { Component comp = new Component( "comp" ); comp.addExportedVariable( new ExportedVariable( "test", "ok" )); Component parent = new Component( "parent" ); parent.addExportedVariable( new ExportedVariable( "property", "value" )); comp.extendComponent( parent ); Map<String,String> exports = ComponentHelpers.findAllExportedVariables( comp ); Assert.assertEquals( 3, exports.size()); Assert.assertEquals( "ok", exports.get( "comp.test" )); Assert.assertEquals( "value", exports.get( "parent.property" )); Assert.assertEquals( "value", exports.get( "comp.property" )); comp.addExportedVariable( new ExportedVariable( "parent.property", "something different" )); exports = ComponentHelpers.findAllExportedVariables( comp ); Assert.assertEquals( 3, exports.size()); Assert.assertEquals( "ok", exports.get( "comp.test" )); Assert.assertEquals( "something different", exports.get( "parent.property" )); Assert.assertEquals( "something different", exports.get( "comp.property" )); comp.exportedVariables.remove( "parent.property" ); comp.addExportedVariable( new ExportedVariable( "property", "great" )); exports = ComponentHelpers.findAllExportedVariables( comp ); Assert.assertEquals( 3, exports.size()); Assert.assertEquals( "ok", exports.get( "comp.test" )); Assert.assertEquals( "great", exports.get( "parent.property" )); Assert.assertEquals( "great", exports.get( "comp.property" )); comp.exportedVariables.remove( "property" ); comp.addExportedVariable( new ExportedVariable( "comp.property", "ha! ha!" )); exports = ComponentHelpers.findAllExportedVariables( comp ); Assert.assertEquals( 3, exports.size()); Assert.assertEquals( "ok", exports.get( "comp.test" )); Assert.assertEquals( "value", exports.get( "parent.property" )); Assert.assertEquals( "ha! ha!", exports.get( "comp.property" )); }
public static Map<String,String> findAllExportedVariables( Component component ) { return findAllExportedVariables( component, new HashSet<Component>( 0 )); }
ComponentHelpers { public static Map<String,String> findAllExportedVariables( Component component ) { return findAllExportedVariables( component, new HashSet<Component>( 0 )); } }
ComponentHelpers { public static Map<String,String> findAllExportedVariables( Component component ) { return findAllExportedVariables( component, new HashSet<Component>( 0 )); } private  ComponentHelpers(); }
ComponentHelpers { public static Map<String,String> findAllExportedVariables( Component component ) { return findAllExportedVariables( component, new HashSet<Component>( 0 )); } private  ComponentHelpers(); static Component findComponent( Graphs graphs, String name ); static Component findComponent( AbstractApplication app, String name ); static Component findComponentFrom( Component component, String componentName ); static List<String> extractNames( Collection<? extends AbstractType> types ); static boolean isTarget( Component component ); static Collection<Component> findAllChildren( Component component ); static Collection<Component> findAllAncestors( Component component ); static String findComponentInstaller( Component component ); static Map<String,String> findAllExportedVariables( Component component ); static Map<String,String> findAllExportedVariables( AbstractType type ); static Map<String,String> findAllExportedVariables( Graphs graphs ); static Map<String,String> findAllExportedVariables( Facet facet ); static Map<String,ImportedVariable> findAllImportedVariables( Component component ); static Collection<Facet> findAllFacets( Component component ); static List<Component> findAllExtendedComponents( Component component ); static Collection<Facet> findAllExtendedFacets( Facet facet ); static Collection<Facet> findAllExtendingFacets( Facet facet ); static Collection<Component> findAllExtendingComponents( Component component ); static List<Component> findAllComponents( Graphs graphs ); static List<Component> findAllComponents( AbstractApplication app ); static String searchForLoop( Component component ); static String searchForInheritanceCycle( Facet facet ); static String searchForInheritanceCycle( Component component ); static Map<String,Boolean> findComponentDependenciesFor( Component component ); static Map<Component,Boolean> findComponentDependenciesFor( Component component, ApplicationTemplate app ); static Map<Component,Boolean> findComponentsThatDependOn( Component component, ApplicationTemplate app ); }
ComponentHelpers { public static Map<String,String> findAllExportedVariables( Component component ) { return findAllExportedVariables( component, new HashSet<Component>( 0 )); } private  ComponentHelpers(); static Component findComponent( Graphs graphs, String name ); static Component findComponent( AbstractApplication app, String name ); static Component findComponentFrom( Component component, String componentName ); static List<String> extractNames( Collection<? extends AbstractType> types ); static boolean isTarget( Component component ); static Collection<Component> findAllChildren( Component component ); static Collection<Component> findAllAncestors( Component component ); static String findComponentInstaller( Component component ); static Map<String,String> findAllExportedVariables( Component component ); static Map<String,String> findAllExportedVariables( AbstractType type ); static Map<String,String> findAllExportedVariables( Graphs graphs ); static Map<String,String> findAllExportedVariables( Facet facet ); static Map<String,ImportedVariable> findAllImportedVariables( Component component ); static Collection<Facet> findAllFacets( Component component ); static List<Component> findAllExtendedComponents( Component component ); static Collection<Facet> findAllExtendedFacets( Facet facet ); static Collection<Facet> findAllExtendingFacets( Facet facet ); static Collection<Component> findAllExtendingComponents( Component component ); static List<Component> findAllComponents( Graphs graphs ); static List<Component> findAllComponents( AbstractApplication app ); static String searchForLoop( Component component ); static String searchForInheritanceCycle( Facet facet ); static String searchForInheritanceCycle( Component component ); static Map<String,Boolean> findComponentDependenciesFor( Component component ); static Map<Component,Boolean> findComponentDependenciesFor( Component component, ApplicationTemplate app ); static Map<Component,Boolean> findComponentsThatDependOn( Component component, ApplicationTemplate app );  }