我有一个如下所示的 Java 文件:
package AuthorizeNetFingerprint;
class Fingerprint {
private static Log logger = LogFactory.getLog(Fingerprint.class);
private long sequence;
private long timeStamp;
private String fingerprintHash;
private Fingerprint() {
}
/**
* Creates a fingerprint with raw data fields.
*
* @param loginID
* @param transactionKey
* @param sequence : this number will be concatenated with a random value
* @param amount
* @return A Fingerprint object.
*/
public static String createFingerprint(String loginID,
String transactionKey, long sequence, String amount) {
return transactionKey;
}
}
我正在尝试像这样的scala访问它:
val fingerprint = new AuthorizeNetFingerprint.Fingerprint
val x_fp_hash = fingerprint.createFingerprint(x_api_login_id,
transaction_key, x_fp_sequence, x_amount)
它给了我这个错误:
包 AuthorizeNetFingerprint 中的对象指纹无法在包 AuthorizeNetFingerprint 中访问
是否可以在 Play Framework 中混合使用 scala 和 java?
我做错了什么?
编辑
我需要:公共类指纹
代替
class Fingerprint