java

package
v0.6.0 Latest Latest
Warning

This package is not in the latest version of its module.

Go to latest
Published: Jun 23, 2024 License: AGPL-3.0 Imports: 10 Imported by: 0

Documentation

Index

Constants

View Source
const (
	TestCodePrintHelloWorld = `public class main {
    public static void main(String[] args) {
        System.out.println("Hello world"); 
    }
}`
	TestCodeDifferentClass = `public class feladat {
    public static void main(String[] args) {
        System.out.println("Hello world"); 
    }
}`
)

Variables

This section is empty.

Functions

This section is empty.

Types

type Jar

type Jar struct {
	Name     string
	Contents []byte
}

type Java

type Java struct {
	// contains filtered or unexported fields
}

func New

func New(className string, opts ...Option) *Java

func (*Java) Compile

func (j *Java) Compile(ctx context.Context, s sandbox.Sandbox, f sandbox.File, stderr io.Writer, extras []sandbox.File) (*sandbox.File, error)

func (*Java) DefaultFilename added in v0.4.0

func (j *Java) DefaultFilename() string

func (*Java) DisplayName added in v0.4.0

func (*Java) DisplayName() string

func (*Java) ID added in v0.4.0

func (*Java) ID() string

func (*Java) Rename added in v0.4.0

func (j *Java) Rename(source sandbox.File) (*sandbox.File, string, error)

func (*Java) Run

func (j *Java) Run(ctx context.Context, s sandbox.Sandbox, binary sandbox.File, stdin io.Reader, stdout io.Writer, tl time.Duration, ml memory.Amount) (*sandbox.Status, error)

func (*Java) Test

func (j *Java) Test(t *testing.T, s sandbox.Sandbox) error

type Option added in v0.4.0

type Option func(*Java)

func AutoClassName added in v0.4.0

func AutoClassName() Option

func WithJars added in v0.4.0

func WithJars(jars ...Jar) Option

Jump to

Keyboard shortcuts

? : This menu
/ : Search site
f or F : Jump to
y or Y : Canonical URL