Created
March 10, 2012 14:36
-
-
Save zaneli/2011592 to your computer and use it in GitHub Desktop.
「Java インターフェースをスクリプト言語で実装する」ブログ用
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
package com.zaneli.script; | |
public interface ScriptService { | |
void echo(String message); | |
String getName(); | |
int calculate(int num); | |
} |
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
function echo(message) { | |
println(message); | |
} | |
function getName() { | |
return "JavaScript Service"; | |
} | |
function calculate(num) { | |
return num + 1; | |
} |
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
def echo(message): | |
print(message) | |
def getName(): | |
return "Python Service" | |
def calculate(num): | |
return num - 1 |
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
def echo(message) | |
puts message | |
end | |
def getName | |
return "Ruby Service" | |
end | |
def calculate(num) | |
return num * 2 | |
end |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment