1 21 package org.jacorb.idl; 22 23 import java.io.PrintWriter ; 24 25 public class StateMember 26 extends Member 27 { 28 public boolean isPublic = false; 29 30 public StateMember( int num ) 31 { 32 super( num ); 33 } 34 35 39 public Member extractMember( Declarator d ) 40 { 41 StateMember result = new StateMember( new_num() ); 42 result.declarator = d; 43 result.isPublic = this.isPublic; 44 return result; 45 } 46 47 public void print( PrintWriter ps ) 48 { 49 if( this.isPublic ) 50 member_print( ps, "\tpublic " ); 51 else 52 member_print( ps, "\tprotected " ); 53 } 54 55 public String writeStatement( String outStreamName ) 56 { 57 return type_spec.printWriteStatement( declarator.name(), 58 outStreamName ); 59 } 60 61 public String readStatement( String inStreamName ) 62 { 63 return type_spec.printReadStatement( declarator.name(), 64 inStreamName ); 65 } 66 } 67 68 69 70 | Popular Tags |