1 8 package org.apache.avalon.phoenix; 9 10 import java.util.EventObject ; 11 import org.apache.avalon.phoenix.metainfo.BlockInfo; 12 13 20 public final class BlockEvent 21 extends EventObject 22 { 23 private final String m_name; 24 25 private final Object m_block; 26 27 private final BlockInfo m_blockInfo; 28 29 36 public BlockEvent( final String name, 37 final Object block, 38 final BlockInfo blockInfo ) 39 { 40 super( name ); 41 42 if( null == name ) 43 { 44 throw new NullPointerException ( "name property is null" ); 45 } 46 if( null == block ) 47 { 48 throw new NullPointerException ( "block property is null" ); 49 } 50 if( null == blockInfo ) 51 { 52 throw new NullPointerException ( "blockInfo property is null" ); 53 } 54 55 m_name = name; 56 m_block = block; 57 m_blockInfo = blockInfo; 58 } 59 60 65 public String getName() 66 { 67 return m_name; 68 } 69 70 75 public Object getObject() 76 { 77 return m_block; 78 } 79 80 87 public Block getBlock() 88 { 89 return (Block)m_block; 90 } 91 92 97 public BlockInfo getBlockInfo() 98 { 99 return m_blockInfo; 100 } 101 } 102 | Popular Tags |