= Introspection _(enum)_
:Notice: Licensed to the Apache Software Foundation (ASF) under one or more contributor license agreements. See the NOTICE file distributed with this work for additional information regarding copyright ownership. The ASF licenses this file to you under the Apache License, Version 2.0 (the "License"); you may not use this file except in compliance with the License. You may obtain a copy of the License at. http://www.apache.org/licenses/LICENSE-2.0 . Unless required by applicable law or agreed to in writing, software distributed under the License is distributed on an "AS IS" BASIS, WITHOUT WARRANTIES OR  CONDITIONS OF ANY KIND, either express or implied. See the License for the specific language governing permissions and limitations under the License.

The available policies as to how class introspection should process members, supporting methods and callback methods.

Particularly whether to consider or ignore non-public members as contributors to the meta-model (encapsulation). And also whether or not to enforce presence of the _Domain.Include_ annotation on those members.

== API

[source,java]
.Introspection.java
----
enum Introspection {
  NOT_SPECIFIED     // <.>
  AS_CONFIGURED     // <.>
  ENCAPSULATION_ENABLED     // <.>
  ANNOTATION_REQUIRED     // <.>
  ANNOTATION_OPTIONAL     // <.>
  boolean isNotSpecified()
  boolean isAsConfigured()
}
----

<.> xref:#NOT_SPECIFIED[NOT_SPECIFIED]
+
--
Ignore the value provided by this annotation (meaning that the framework will keep searching, in meta annotations or super-classes/interfaces).
--
<.> xref:#AS_CONFIGURED[AS_CONFIGURED]
+
--
Introspection should be handled as per the default introspection policy configured in `application.properties` .
--
<.> xref:#ENCAPSULATION_ENABLED[ENCAPSULATION_ENABLED]
+
--
Introspect public and non-public members.
--
<.> xref:#ANNOTATION_REQUIRED[ANNOTATION_REQUIRED]
+
--
Introspect public members only, while presence of at least one appropriate domain annotation is enforced.
--
<.> xref:#ANNOTATION_OPTIONAL[ANNOTATION_OPTIONAL]
+
--
Introspect public members only, while presence of domain annotations is optional.
--

== Members

[#NOT_SPECIFIED]
=== NOT_SPECIFIED

Ignore the value provided by this annotation (meaning that the framework will keep searching, in meta annotations or super-classes/interfaces).

[#AS_CONFIGURED]
=== AS_CONFIGURED

Introspection should be handled as per the default introspection policy configured in `application.properties` .

If not configured, then encapsulation is disabled and presence of the _Domain.Include_ annotation is not enforced.

[#ENCAPSULATION_ENABLED]
=== ENCAPSULATION_ENABLED

Introspect public and non-public members.

All methods intended to be part of the meta-model (whether representing a member or a supporting method) must be annotated. Members using one of xref:refguide:applib:index/annotation/Action.adoc[Action] , xref:refguide:applib:index/annotation/Property.adoc[Property] , xref:refguide:applib:index/annotation/Collection.adoc[Collection] , while supporting methods with _Domain.Include_ (usually as a meta-annotation on xref:refguide:applib:index/annotation/MemberSupport.adoc[MemberSupport] ). However, the methods can have any visibility, including private.

For mixins (where the mixin class itself is annotated with xref:refguide:applib:index/annotation/Action.adoc[Action] , xref:refguide:applib:index/annotation/Property.adoc[Property] or xref:refguide:applib:index/annotation/Collection.adoc[Collection] , then the member method should instead be annotated the same as the supporting methods, _Domain.Include_ or xref:refguide:applib:index/annotation/MemberSupport.adoc[MemberSupport] .

[#ANNOTATION_REQUIRED]
=== ANNOTATION_REQUIRED

Introspect public members only, while presence of at least one appropriate domain annotation is enforced.

All public methods intended to represent members must be annotated (or meta-annotated) with xref:refguide:applib:index/annotation/Action.adoc[Action] , xref:refguide:applib:index/annotation/Property.adoc[Property] or xref:refguide:applib:index/annotation/Collection.adoc[Collection] .

Any non-excluded public methods with a supporting method prefix do not need to be annotated and are automatically associated with their corresponding member method. If no corresponding member method can be found, meta-model validation will fail with an 'orphaned member support' method violation.

For mixins (where the mixin class itself is annotated with xref:refguide:applib:index/annotation/Action.adoc[Action] , xref:refguide:applib:index/annotation/Property.adoc[Property] or xref:refguide:applib:index/annotation/Collection.adoc[Collection] , then the member method should instead be annotated the same as the supporting methods, _Domain.Include_ or xref:refguide:applib:index/annotation/MemberSupport.adoc[MemberSupport] .

[#ANNOTATION_OPTIONAL]
=== ANNOTATION_OPTIONAL

Introspect public members only, while presence of domain annotations is optional.

All public methods are considered as part of the meta-model, unless explicitly excluded using _Domain.Exclude_ (usually as a meta-annotation on xref:refguide:applib:index/annotation/Programmatic.adoc[Programmatic] ).

Any non-excluded public methods with a supporting method prefix do not need to be annotated and are automatically associated with their corresponding member method. If no corresponding member method can be found, meta-model validation will fail with an 'orphaned member support' method violation.
