For example, if you would like to change the type of argument msg
to MyMessage
inherited from Message
, what would you do?
Is there no other way than to add it to a class that has a method to override?
MessageHandlerHandlerReqNormalizedCardinal=newMessageHandler(){
@ Override
public Message process (Message msg) threads Exception {
return newRepNormalizedCardinalMessage(MyCFRTCord.this.routingTable.normalizedCardinal);
}
};
I didn't try it because I had a preconceived idea that if I cast it, the extended part would disappear.In other words, msg has a pointer in C language. Sorry for asking such a silly question;
© 2024 OneMinuteCode. All rights reserved.