private static void callSetPropertyValue ( CodeBuilder b , OrderedProperty < ? > op ) { StorableProperty < ? > property = op . getChainedProperty ( ) . getLastProperty ( ) ; TypeDesc propType = TypeDesc . forClass ( property . getType ( ) ) ; if ( propType != TypeDesc . OBJECT ) { TypeDesc objectType = propType . toObjectType ( ) ; b . checkCast ( objectType ) ; // Potentially unbox primitive. b . convert ( objectType , propType ) ; } b . invoke ( property . getWriteMethod ( ) ) ; }
Creates code to call set method . Assumes Storable and property value are already on the stack .