With

@Target(allowedTargets = [])
annotation class With(val key: String, val value: String)

A key-value pair for semantic metadata. Used within @Semantics to define semantic properties of a field.

Kotlin example:

@Semantics([
With("predicate", "works at"),
With("inverse", "employs")
])
val worksAt: Company

Java example (on class field):

@Semantics({
@With(key = "predicate", value = "works at"),
@With(key = "inverse", value = "employs")
})
private Company worksAt;

Java example (on interface getter):

public interface Employee {
@Semantics({
@With(key = "predicate", value = "works at"),
@With(key = "inverse", value = "employs")
})
Company getWorksAt();
}

Properties

Link copied to clipboard
val key: String

The key for this semantic property.

Link copied to clipboard

The value for this semantic property.