protocol

# java_access_protocol

> Protocol for a minimal abstraction for calling Java from Logtalk using familiar message sending syntax.

author:
  `Paulo Moura and Sergio Castro`
version:
  `1.1`
date:
  `2018/5/23`

compilation flags:
  `static`

(no dependencies on other entities)

## Public interface

### get_field/2

> Gets the value of a class or object field.

compilation flags:
  `static`
template:
  `get_field(Field,Value)`
mode – number of proofs:
  `get_field(+atom,?nonvar) – zero_or_one`

### set_field/2

> Sets the value of a class or object field.

compilation flags:
  `static`
template:
  `set_field(Field,Value)`
mode – number of proofs:
  `set_field(+atom,+nonvar) – one`

### new/2

> Creates a new instance using the specified parameter values.

compilation flags:
  `static`
template:
  `new(Parameters,Instance)`
mode – number of proofs:
  `new(+list(nonvar),-reference) – one`

### new/1

> Creates a new instance using default parameter values.

compilation flags:
  `static`
template:
  `new(Instance)`
mode – number of proofs:
  `new(-reference) – one`

### invoke/1

> Invokes a method. This is a more efficient compared with relying on the forward/1 handler to resolve methods.

compilation flags:
  `static`
template:
  `invoke(Method)`
mode – number of proofs:
  `invoke(@nonvar) – one`

### invoke/2

> Invokes a method. This is a more efficient compared with relying on the forward/1 handler to resolve methods.

compilation flags:
  `static`
template:
  `invoke(Functor,Arguments)`
mode – number of proofs:
  `invoke(@nonvar,@list) – one`

## Protected interface

(none)

## Private predicates

(none)

## Operators

### (none)

## Remarks

### (none)

## See also

### (none)