| 1 |
|
| 2 |
|
| 3 |
|
| 4 |
|
| 5 |
package javapkg |
| 6 |
|
| 7 |
import ( |
| 8 |
"Java/java/lang/Float" |
| 9 |
"Java/java/lang/Integer" |
| 10 |
"Java/java/lang/System" |
| 11 |
"Java/java/util/Collections" |
| 12 |
"Java/java/util/jar/JarFile" |
| 13 |
"fmt" |
| 14 |
) |
| 15 |
|
| 16 |
func SystemCurrentTimeMillis() int64 { |
| 17 |
return System.CurrentTimeMillis() |
| 18 |
} |
| 19 |
|
| 20 |
func FloatMin() float32 { |
| 21 |
return Float.MIN_VALUE |
| 22 |
} |
| 23 |
|
| 24 |
func ManifestName() string { |
| 25 |
return JarFile.MANIFEST_NAME |
| 26 |
} |
| 27 |
|
| 28 |
func IntegerBytes() int { |
| 29 |
return Integer.SIZE |
| 30 |
} |
| 31 |
|
| 32 |
func IntegerValueOf(v int32) int32 { |
| 33 |
i, _ := Integer.ValueOf(v) |
| 34 |
return i.IntValue() |
| 35 |
} |
| 36 |
|
| 37 |
func IntegerDecode(v string) (int32, error) { |
| 38 |
i, err := Integer.Decode(v) |
| 39 |
if err != nil { |
| 40 |
return 0, fmt.Errorf("wrapped error: %v", err) |
| 41 |
} |
| 42 |
|
| 43 |
i.HashCode() |
| 44 |
return i.IntValue(), nil |
| 45 |
} |
| 46 |
|
| 47 |
func IntegerParseInt(v string, radix int32) (int32, error) { |
| 48 |
return Integer.ParseInt(v, radix) |
| 49 |
} |
| 50 |
|
| 51 |
func ProvokeRuntimeException() (err error) { |
| 52 |
defer func() { |
| 53 |
err = recover().(error) |
| 54 |
}() |
| 55 |
Collections.Copy(nil, nil) |
| 56 |
return |
| 57 |
} |