1 8 package org.apache.avalon.phoenix.metadata; 9 10 import org.apache.avalon.phoenix.metainfo.BlockInfo; 11 12 17 public class BlockMetaData 18 { 19 private final String m_name; 20 21 private final DependencyMetaData[] m_dependencies; 22 23 private final boolean m_disableProxy; 24 25 private final BlockInfo m_blockInfo; 26 27 public BlockMetaData( final String name, 28 final DependencyMetaData[] dependencies, 29 final boolean disableProxy, 30 final BlockInfo blockInfo ) 31 { 32 m_name = name; 33 m_dependencies = dependencies; 34 m_disableProxy = disableProxy; 35 m_blockInfo = blockInfo; 36 } 37 38 public String getName() 39 { 40 return m_name; 41 } 42 43 46 public String getClassname() 47 { 48 return getImplementationKey(); 49 } 50 51 public String getImplementationKey() 52 { 53 return getBlockInfo().getBlockDescriptor().getImplementationKey(); 54 } 55 56 public BlockInfo getBlockInfo() 57 { 58 return m_blockInfo; 59 } 60 61 public DependencyMetaData getDependency( final String name ) 62 { 63 for( int i = 0; i < m_dependencies.length; i++ ) 64 { 65 if( m_dependencies[ i ].getRole().equals( name ) ) 66 { 67 return m_dependencies[ i ]; 68 } 69 } 70 71 return null; 72 } 73 74 public DependencyMetaData[] getDependencies() 75 { 76 return m_dependencies; 77 } 78 79 public boolean isDisableProxy() 80 { 81 return m_disableProxy; 82 } 83 } 84 | Popular Tags |