use package variable
This commit is contained in:
parent
12b5172685
commit
693e37dd25
|
@ -1,6 +1,8 @@
|
||||||
use strict;
|
use strict;
|
||||||
use File::Path;
|
use File::Path;
|
||||||
|
|
||||||
|
my $package = 'net.hyperic.sigar';
|
||||||
|
|
||||||
my %platforms = (
|
my %platforms = (
|
||||||
A => "AIX",
|
A => "AIX",
|
||||||
D => "Darwin",
|
D => "Darwin",
|
||||||
|
@ -1235,7 +1237,7 @@ while (my($class, $fields) = each %classes) {
|
||||||
print HFH "#define JSIGAR_FIELDS_MAX $i\n";
|
print HFH "#define JSIGAR_FIELDS_MAX $i\n";
|
||||||
|
|
||||||
while (my($name, $fields) = each %classes) {
|
while (my($name, $fields) = each %classes) {
|
||||||
my $java_class = "net.hyperic.sigar.$name";
|
my $java_class = "$package.$name";
|
||||||
(my $jni_prefix = "Java.$java_class") =~ s/\./_/g;
|
(my $jni_prefix = "Java.$java_class") =~ s/\./_/g;
|
||||||
my $class = $name;
|
my $class = $name;
|
||||||
my $cname;
|
my $cname;
|
||||||
|
@ -1332,7 +1334,7 @@ EOF
|
||||||
my $cache_field_ids = 1;
|
my $cache_field_ids = 1;
|
||||||
|
|
||||||
print JFH <<EOF;
|
print JFH <<EOF;
|
||||||
package net.hyperic.sigar;
|
package $package;
|
||||||
|
|
||||||
import java.util.HashMap;
|
import java.util.HashMap;
|
||||||
import java.util.Map;
|
import java.util.Map;
|
||||||
|
@ -1350,7 +1352,7 @@ public class $name {
|
||||||
* This method is not intended to be called directly.
|
* This method is not intended to be called directly.
|
||||||
* use Sigar.get$name() instead.
|
* use Sigar.get$name() instead.
|
||||||
* \@exception SigarException on failure.
|
* \@exception SigarException on failure.
|
||||||
* \@see net.hyperic.sigar.Sigar#get$name
|
* \@see $package.Sigar#get$name
|
||||||
*/
|
*/
|
||||||
static $name fetch($jargs_proto) throws SigarException {
|
static $name fetch($jargs_proto) throws SigarException {
|
||||||
$name $jname = new $name();
|
$name $jname = new $name();
|
||||||
|
|
Loading…
Reference in New Issue