public Object getCurrentValue ( Change change ) { try { for ( PropertyDescriptor descriptor : PropertyUtils . getInstance ( ) . getDescriptors ( change . getClass ( ) ) ) { if ( descriptor . getDisplayName ( ) . equals ( this . parameterName ) ) { Method readMethod = descriptor . getReadMethod ( ) ; if ( readMethod == null ) { readMethod = change . getClass ( ) . getMethod ( "is" + StringUtil . upperCaseFirst ( descriptor . getName ( ) ) ) ; } return readMethod . invoke ( change ) ; } } throw new RuntimeException ( "Could not find readMethod for " + this . parameterName ) ; } catch ( Exception e ) { throw new UnexpectedLiquibaseException ( e ) ; } }
Returns the current value of this parameter for the given Change .