@Retention(value=RUNTIME)
@Target(value=TYPE)
public @interface Interface
Service interface annotation.
(# componentTypes ()
), and the set service component type must be a Java interface that does not support normal classes. For example, set componentTypes = {com.supermap.services.components.Map.class} to indicate that the current service interface supports the map service component.
Set whether the service component type is selected by setting optional
, e.g., when it configures componentTypes={Component1.class, Component2.class}, if optional = true, it means it can use Component1 or Component2; if optional =false, it means both service components must be supported, that is, in the service component set, it as least provides one of the two components Component1 and Component2.
Modifier and Type | Required Element and Description |
---|---|
java.lang.Class[] |
componentTypes
Service component type.
|
public abstract java.lang.Class[] componentTypes
Service component type. , Must be a Java interface, does not support ordinary class
Set the service component type for the service interface, should be Java interface, not supporting general class. The default value is Class empty array.
public abstract boolean optional
whether the service component type is selected.
ture is optional, false is not optional (each service component is required). Such as componentTypes = {Component1.class, Component2.class}, when optional = true, that can use Component1 and Component2 any of these types of service components; when optional = false , It means that both types of service components must be used.
The default value is false.
public abstract boolean multiple
Whether it supports multiple similar service components.
true means it supports multiple similar service components, false means not supported. The default value is true.