void setParent ( JMFMessageData parent ) { if ( TraceComponent . isAnyTracingEnabled ( ) && tc . isEntryEnabled ( ) ) JmfTr . entry ( this , tc , "setParent" , new Object [ ] { parent } ) ; synchronized ( getMessageLockArtefact ( ) ) { // If the parent is a JSMessageData then this is straight forward if ( parent instanceof JSMessageData ) { parentMessage = ( JSMessageData ) parent ; master = ( ( JSMessageData ) parent ) . master ; containingMessage = ( ( JSMessageData ) parent ) . compatibilityWrapperOrSelf ; } // ... if not, it must be a JSCompatibleMessageImpl, and its encoding must // be a JSMessageData, because if it was a JMFEncapsulation it couldn't be our parent else { JSMessageData msg = ( JSMessageData ) ( ( JSCompatibleMessageImpl ) parent ) . getEncodingMessage ( ) ; parentMessage = msg ; master = msg . master ; containingMessage = parent ; } } if ( TraceComponent . isAnyTracingEnabled ( ) && tc . isEntryEnabled ( ) ) JmfTr . exit ( this , tc , "setParent" ) ; }
method is not private & we re somewhat paranoid .