JRuby for the Java .class is .java_class

I’ve been having a lot of fun working with a Apache jclouds in JRuby. All the examples for the API are in Java and Clojure, while online JRuby docs could be better, so there’ve been some interesting translation challenges.

I just had to re-Google what .class becomes in JRuby, so a quick note for the future.

Java:

template.getOptions().as(EC2TemplateOptions.class).keyPair("bluforcloud-test");

JRuby:

template.getOptions.as(EC2TemplateOptions.java_class).keyPair "bluforcloud-test"

 

Leave a Reply

Fill in your details below or click an icon to log in:

WordPress.com Logo

You are commenting using your WordPress.com account. Log Out /  Change )

Facebook photo

You are commenting using your Facebook account. Log Out /  Change )

Connecting to %s

This site uses Akismet to reduce spam. Learn how your comment data is processed.