code: @Override
      protected Accessor getAccessor( final String beanName, final boolean useMethod, final boolean useJsni, Object... params ) {
          if ( !useJsni ) {
              if ( useMethod ) {
                  return new Accessor( CodeBlock.builder().add( beanName + "." + method.get().getName() + "()" ).build() );
              } else {
                  return new Accessor( CodeBlock.builder().add( beanName + "." + field.get().getName() ).build() );
              }
          }
  
          // field/getter has not been detected or is private or is in a different package. We use JSNI to access getter/field.
          final JType fieldType;
          final JClassType enclosingType;
          if ( useMethod ) {
              fieldType = method.get().getReturnType();
              enclosingType = method.get().getEnclosingType();
          } else {
              fieldType = field.get().getType();
              enclosingType = field.get().getEnclosingType();
          }
  
          JsniCodeBlockBuilder jsniCode = JsniCodeBlockBuilder.builder();
          if ( useMethod ) {
              jsniCode.addStatement( "return bean.@$L::$L()()", enclosingType.getQualifiedSourceName(), method.get().getName() );
          } else {
              jsniCode.addStatement( "return bean.@$L::$L", enclosingType.getQualifiedSourceName(), field.get().getName() );
          }
  
          MethodSpec additionalMethod = MethodSpec.methodBuilder( "getValueWithJsni" )
                  .addModifiers( Modifier.PRIVATE, Modifier.NATIVE )
                  .returns( typeName( fieldType ) )
                  .addParameter( typeName( enclosingType ), "bean" )
                  .addCode( jsniCode.build() )
                  .build();
  
          CodeBlock accessor = CodeBlock.builder().add( "$N($L)", additionalMethod, beanName ).build();
  
          return new Accessor( accessor, additionalMethod );
      }
docs: {@inheritDoc}