Return-Path: X-Original-To: archive-asf-public-internal@cust-asf2.ponee.io Delivered-To: archive-asf-public-internal@cust-asf2.ponee.io Received: from cust-asf.ponee.io (cust-asf.ponee.io [163.172.22.183]) by cust-asf2.ponee.io (Postfix) with ESMTP id 6A24C200C8B for ; Mon, 22 May 2017 19:41:03 +0200 (CEST) Received: by cust-asf.ponee.io (Postfix) id 68C75160BBF; Mon, 22 May 2017 17:41:03 +0000 (UTC) Delivered-To: archive-asf-public@cust-asf.ponee.io Received: from mail.apache.org (hermes.apache.org [140.211.11.3]) by cust-asf.ponee.io (Postfix) with SMTP id AEC8F160BAD for ; Mon, 22 May 2017 19:41:02 +0200 (CEST) Received: (qmail 1789 invoked by uid 500); 22 May 2017 17:41:01 -0000 Mailing-List: contact users-help@groovy.apache.org; run by ezmlm Precedence: bulk List-Help: List-Unsubscribe: List-Post: List-Id: Reply-To: users@groovy.apache.org Delivered-To: mailing list users@groovy.apache.org Received: (qmail 1771 invoked by uid 99); 22 May 2017 17:41:01 -0000 Received: from pnap-us-west-generic-nat.apache.org (HELO spamd1-us-west.apache.org) (209.188.14.142) by apache.org (qpsmtpd/0.29) with ESMTP; Mon, 22 May 2017 17:41:01 +0000 Received: from localhost (localhost [127.0.0.1]) by spamd1-us-west.apache.org (ASF Mail Server at spamd1-us-west.apache.org) with ESMTP id 4C8BBCEE2C for ; Mon, 22 May 2017 17:41:01 +0000 (UTC) X-Virus-Scanned: Debian amavisd-new at spamd1-us-west.apache.org X-Spam-Flag: NO X-Spam-Score: 2.379 X-Spam-Level: ** X-Spam-Status: No, score=2.379 tagged_above=-999 required=6.31 tests=[DKIM_SIGNED=0.1, DKIM_VALID=-0.1, DKIM_VALID_AU=-0.1, HTML_MESSAGE=2, RCVD_IN_DNSWL_NONE=-0.0001, RCVD_IN_MSPIKE_H3=-0.01, RCVD_IN_MSPIKE_WL=-0.01, RCVD_IN_SORBS_SPAM=0.5, SPF_PASS=-0.001] autolearn=disabled Authentication-Results: spamd1-us-west.apache.org (amavisd-new); dkim=pass (2048-bit key) header.d=gmail.com Received: from mx1-lw-eu.apache.org ([10.40.0.8]) by localhost (spamd1-us-west.apache.org [10.40.0.7]) (amavisd-new, port 10024) with ESMTP id 4dlwoELbOC6L for ; Mon, 22 May 2017 17:41:00 +0000 (UTC) Received: from mail-oi0-f46.google.com (mail-oi0-f46.google.com [209.85.218.46]) by mx1-lw-eu.apache.org (ASF Mail Server at mx1-lw-eu.apache.org) with ESMTPS id C81ED5FB80 for ; Mon, 22 May 2017 17:40:59 +0000 (UTC) Received: by mail-oi0-f46.google.com with SMTP id l18so170751997oig.2 for ; Mon, 22 May 2017 10:40:59 -0700 (PDT) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=gmail.com; s=20161025; h=mime-version:from:date:message-id:subject:to; bh=FS2AMNlBTQEo0pAnBIMysYPYajOBDEU6ew8Y4vYTPU0=; b=T5CAenkyGRbC0otJfVx8XkETIOevVzuiynHsV9pvhf4otmFDyM4UKniqBJpiBfzT9q QXUOxqBlK9x4yOzMrJ4lWXCmOaQjHbb0/o01BmlQ8BhVKeJqK7y7QE6/aCVeSTbFS07R jdqHmhumswMvc6YbCHIER3VtJ+kosJA3V9aiuxeNJx2W4zZp4Twf4aXvIJ+8h0FdiINz +zXU+CAN1RFu+ieXN4E833OUQ05DxKDomurJpDMVYaX2HRCkYzeltXmvJCXbtSCwgSSn m1afoklhtQwQY8DxADMqx4n5ahphCIshwYlFsM8gPxtG1z24/+inQ3G7+7/f6Ro3ObUZ i+xg== X-Google-DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=1e100.net; s=20161025; h=x-gm-message-state:mime-version:from:date:message-id:subject:to; bh=FS2AMNlBTQEo0pAnBIMysYPYajOBDEU6ew8Y4vYTPU0=; b=MIp7uskMRcvMDn1va5mLAtrccHucFtPH+7lr5x5pgvObtvSj72wkCZ/r+MQUR0a0+e 5+zYT2b8dNHQ7OhMfXlxPp6CAciUwWy1BN104PHfgGfq66BQkrkpfZ71YepWQNWJvmLc UPJgYuEP7xnmi2h1gSDGnQ9JIA6NMNBk/55ptW7SmL2YQY7mcKf7veb23OEMslwXklMw tF0ec8xAImRU6IJnMjzWTmII0SyG9Qiq5i+4cM+ZbUM9n/vKGTCYeF1RBEpBcuXEASom tsijOKYyqgPuTDJKkEHTaAYscERXlSbhZqaLp0llWT/2U+P1BGtI53aL+8UYIBejbhKe DJsg== X-Gm-Message-State: AODbwcCsMEi/ev8NBK43FDiV5JDGIOcs8Mo/+QMHwicP/kGajPFFKuf0 8kGVrxs0pay0+sPS3X18OVUjVjNnel7n X-Received: by 10.157.57.246 with SMTP id y109mr15224929otb.226.1495474858533; Mon, 22 May 2017 10:40:58 -0700 (PDT) MIME-Version: 1.0 Received: by 10.157.29.164 with HTTP; Mon, 22 May 2017 10:40:58 -0700 (PDT) From: RJ Date: Mon, 22 May 2017 13:40:58 -0400 Message-ID: Subject: Simple question.. how to call a java class method in Groovy Script To: users@groovy.apache.org Content-Type: multipart/alternative; boundary="001a11406d26b6a8f70550205f54" archived-at: Mon, 22 May 2017 17:41:03 -0000 --001a11406d26b6a8f70550205f54 Content-Type: text/plain; charset="UTF-8" Here is my script. Highlighted the method call.. tried some google searches for the syntax. Thanks for the help! import java.util.* import com.example.auth.user; class EBSAttrRelease { def Map> run(final UserObject... args) { def userid=com.example.auth.user.getId() return [MYLOGINID:userid] } } Error: 2017-05-22 13:32:56,986 ERROR - --001a11406d26b6a8f70550205f54 Content-Type: text/html; charset="UTF-8" Content-Transfer-Encoding: quoted-printable
Here is my script. Highlighted the method call.. trie= d some google searches for the syntax. Thanks for the help!

import j= ava.util.*
import com.example.auth.user;

class EBSAttrRelease {=C2=A0=C2=A0=C2=A0 def Map<UserString, List<UserObject>> run(= final UserObject... args) {
=C2=A0=C2=A0=C2=A0 def userid=3Dcom.example.auth.user.getId()
=C2=A0=C2=A0=C2=A0 = return [MYLOGINID:userid]
=C2=A0=C2=A0=C2=A0 }
}

Error:<= br>
2017-05-22 13:32:56,986 ERROR - <groovy.lang.MissingMethodExcept= ion: No signature of method: static com.example.auth.user.getId() is applic= able for argument types: () values: []
Possible solutions: getAt(java.la= ng.String), wait(), find(), grep(), wait(long), grep(java.lang.Object)><= br>
--001a11406d26b6a8f70550205f54--