Object getPropertyValue ( final String propName , final Interpreter interp ) throws UtilEvalError { String accessorName = Reflect . accessorName ( Reflect . GET_PREFIX , propName ) ; final Class < ? > [ ] classArray = Reflect . ZERO_TYPES ; BshMethod m = this . getMethod ( accessorName , classArray ) ; try { if ( m != null ) return m . invoke ( ( Object [ ] ) null , interp ) ; accessorName = Reflect . accessorName ( Reflect . IS_PREFIX , propName ) ; m = this . getMethod ( accessorName , classArray ) ; if ( m != null && m . getReturnType ( ) == Boolean . TYPE ) return m . invoke ( ( Object [ ] ) null , interp ) ; return Primitive . VOID ; } catch ( final EvalError ee ) { throw new UtilEvalError ( "'This' property accessor threw exception: " + ee . getMessage ( ) , ee ) ; } }
Get a property from a scripted object or Primitive . VOID if no such property exists .