1 8 package org.apache.avalon.phoenix.metainfo; 9 10 19 public class BlockInfo 20 { 21 private final BlockDescriptor m_descriptor; 22 23 private final ServiceDescriptor[] m_services; 24 25 private final ServiceDescriptor[] m_managementAccessPoints; 26 27 private final DependencyDescriptor[] m_dependencies; 28 29 32 public BlockInfo( final BlockDescriptor descriptor, 33 final ServiceDescriptor[] services, 34 final ServiceDescriptor[] managementAccessPoints, 35 final DependencyDescriptor[] dependencies ) 36 { 37 m_descriptor = descriptor; 38 m_services = services; 39 m_managementAccessPoints = managementAccessPoints; 40 m_dependencies = dependencies; 41 } 42 43 50 public BlockDescriptor getBlockDescriptor() 51 { 52 return m_descriptor; 53 } 54 55 60 public ServiceDescriptor[] getServices() 61 { 62 return m_services; 63 } 64 65 70 public ServiceDescriptor[] getManagementAccessPoints() 71 { 72 return m_managementAccessPoints; 73 } 74 75 80 public DependencyDescriptor[] getDependencies() 81 { 82 return m_dependencies; 83 } 84 85 91 public DependencyDescriptor getDependency( final String role ) 92 { 93 for( int i = 0; i < m_dependencies.length; i++ ) 94 { 95 if( m_dependencies[ i ].getRole().equals( role ) ) 96 { 97 return m_dependencies[ i ]; 98 } 99 } 100 101 return null; 102 } 103 } 104 | Popular Tags |