Search in sources :

Example 1 with ImmutableProtocol

use of io.camunda.zeebe.protocol.record.ImmutableProtocol in project zeebe by camunda-cloud.

the class AnnotationIntrospector method findPOJOBuilder.

@Override
public Class<?> findPOJOBuilder(final AnnotatedClass ac) {
    // find builder for abstract type, e.g. Record, TimerRecordValue, etc.
    final ImmutableProtocol annotation = ac.getAnnotation(ImmutableProtocol.class);
    if (annotation != null) {
        return annotation.builder();
    }
    // find builder for concrete type, e.g. ImmutableRecord, ImmutableTimerRecordValue, etc.
    final ImmutableProtocol.Type type = ac.getAnnotation(ImmutableProtocol.Type.class);
    if (type != null && type.builder() != null) {
        return type.builder();
    }
    return super.findPOJOBuilder(ac);
}
Also used : ImmutableProtocol(io.camunda.zeebe.protocol.record.ImmutableProtocol)

Example 2 with ImmutableProtocol

use of io.camunda.zeebe.protocol.record.ImmutableProtocol in project zeebe by zeebe-io.

the class AnnotationIntrospector method findPOJOBuilder.

@Override
public Class<?> findPOJOBuilder(final AnnotatedClass ac) {
    // find builder for abstract type, e.g. Record, TimerRecordValue, etc.
    final ImmutableProtocol annotation = ac.getAnnotation(ImmutableProtocol.class);
    if (annotation != null) {
        return annotation.builder();
    }
    // find builder for concrete type, e.g. ImmutableRecord, ImmutableTimerRecordValue, etc.
    final ImmutableProtocol.Type type = ac.getAnnotation(ImmutableProtocol.Type.class);
    if (type != null && type.builder() != null) {
        return type.builder();
    }
    return super.findPOJOBuilder(ac);
}
Also used : ImmutableProtocol(io.camunda.zeebe.protocol.record.ImmutableProtocol)

Aggregations

ImmutableProtocol (io.camunda.zeebe.protocol.record.ImmutableProtocol)2