public enum PAnnotation extends Enum<PAnnotation>
Enum Constant and Description |
---|
ARGUMENTS_TYPE
Annotated on a struct field, sets the target struct as arguments that
can be used to have argument field content.
|
CONTAINER
Whether a set-like container are normal (hash-), ordered (linked-hash-)
or sorted (tree-).
|
DEPRECATED
If the field, message, service or method is not supposed to be used any
more.
|
JAVA_EXCEPTION_CLASS
Specify exception class to extend for exception structs.
|
JAVA_HAZELCAST_CLASS_ID
Specify if a struct should be generated using hazelcast.portable interface
to be compatible with serialization and deserialization of hazelcast portable.
|
JAVA_HAZELCAST_FACTORY_ID
Specify if a file should generate with support with hazelcast portable
implementation.
|
JAVA_IMPLEMENTS
Add extra interfaces to a struct.
|
JAVA_PUBLIC_CONSTRUCTOR
For struct and exception.
|
JAVA_SERVICE_METHOD_THROWS
Specify an exception class to throw instead of the default
declared exceptions.
|
JSON_COMPACT
If a struct can use a compact serialized format.
|
MESSAGE_FIELD
Specify which field to use for the exception message.
|
NONE |
REF_ENUM
Annotated on numeric fields (i8m i16 i32) will make methods to set
field from enum value, and get field as enum value.
|
Modifier and Type | Method and Description |
---|---|
static PAnnotation |
forTag(String tag) |
static PAnnotation |
valueOf(String name)
Returns the enum constant of this type with the specified name.
|
static PAnnotation[] |
values()
Returns an array containing the constants of this enum type, in
the order they are declared.
|
public static final PAnnotation NONE
public static final PAnnotation CONTAINER
container = "sorted"
See the PContainer.Type
enum for valid values, and how it is
handled.
public static final PAnnotation DEPRECATED
deprecated = "For some reason"
public static final PAnnotation JSON_COMPACT
json.compact
json.compact = ""
public static final PAnnotation ARGUMENTS_TYPE
arguments.type = "some.Struct"
public static final PAnnotation MESSAGE_FIELD
message.field = "field_name"
public static final PAnnotation REF_ENUM
public static final PAnnotation JAVA_IMPLEMENTS
java.implements = "my.package.MyInterface"
public static final PAnnotation JAVA_EXCEPTION_CLASS
Exception
, this will override that verbatim.
The exception class must be available at compile time, and it *must*
have a constructor accepting string message only.
java.exception.class = "my.package.MyException"
public static final PAnnotation JAVA_PUBLIC_CONSTRUCTOR
java.public.constructor
java.public.constructor = ""
public static final PAnnotation JAVA_SERVICE_METHOD_THROWS
Non-declared exceptions, even if extending the declared exception, will be handled as a system failure, and wrapped in an IOException or sent as an application exception.
java.service.methods.throws = "my.package.MyException"
public static final PAnnotation JAVA_HAZELCAST_FACTORY_ID
The id needs to be a unique int id for each program that is generated with support for hazelcast.
hazelcast.factory.id = "1"
public static final PAnnotation JAVA_HAZELCAST_CLASS_ID
The id needs to be a unique int id for each struct in the program.
hazelcast.factory.id = "1"
public final String tag
public static PAnnotation[] values()
for (PAnnotation c : PAnnotation.values()) System.out.println(c);
public static PAnnotation valueOf(String name)
name
- the name of the enum constant to be returned.IllegalArgumentException
- if this enum type has no constant with the specified nameNullPointerException
- if the argument is null@Nonnull public static PAnnotation forTag(@Nonnull String tag)
Copyright © 2015–2020 morimekta.net. All rights reserved.