Skip to content

Commit cb00c20

Browse files
committed
Minor javadoc additions
1 parent 0e688f6 commit cb00c20

File tree

1 file changed

+51
-6
lines changed

1 file changed

+51
-6
lines changed

src/main/java/com/fasterxml/jackson/databind/AnnotationIntrospector.java

Lines changed: 51 additions & 6 deletions
Original file line numberDiff line numberDiff line change
@@ -268,6 +268,9 @@ public PropertyName findRootName(AnnotatedClass ac) {
268268
* @param config Configuration settings in effect (for serialization or deserialization)
269269
* @param ann Annotated entity (Class, Accessor) to introspect
270270
*
271+
* @return Property ignoral settings to use;
272+
* {@code JsonIgnoreProperties.Value.empty()} for defaults (should not return {@code null})
273+
*
271274
* @since 2.12 (to replace {@code findPropertyIgnorals()})
272275
*/
273276
public JsonIgnoreProperties.Value findPropertyIgnoralByName(MapperConfig<?> config, Annotated ann)
@@ -285,6 +288,9 @@ public JsonIgnoreProperties.Value findPropertyIgnoralByName(MapperConfig<?> conf
285288
* @param config Configuration settings in effect (for serialization or deserialization)
286289
* @param ann Annotated entity (Class, Accessor) to introspect
287290
*
291+
* @return Property inclusion settings to use;
292+
* {@code JsonIncludeProperties.Value.all()} for defaults (should not return {@code null})
293+
*
288294
* @since 2.12
289295
*/
290296
public JsonIncludeProperties.Value findPropertyInclusionByName(MapperConfig<?> config, Annotated ann) {
@@ -362,8 +368,13 @@ public String[] findPropertiesToIgnore(Annotated ac, boolean forSerialization) {
362368
public Boolean findIgnoreUnknownProperties(AnnotatedClass ac) { return null; }
363369

364370
/**
371+
* @param ac Annotated class to introspect
372+
*
365373
* @since 2.8
366374
* @deprecated 2.12, use {@link #findPropertyIgnoralByName} instead.
375+
*
376+
* @return Property ignoral settings to use;
377+
* {@code JsonIgnoreProperties.Value.empty()} for defaults (should not return {@code null})
367378
*/
368379
@Deprecated // since 2.12
369380
public JsonIgnoreProperties.Value findPropertyIgnorals(Annotated ac) {
@@ -382,8 +393,14 @@ public JsonIgnoreProperties.Value findPropertyIgnorals(Annotated ac) {
382393
* A baseline checker is given, and introspector is to either return it as is
383394
* (if no annotations are found), or build and return a derived instance (using
384395
* checker's build methods).
396+
*
397+
* @param ac Annotated class to introspect
398+
* @param checker Default visibility settings in effect before any override
399+
*
400+
* @return Visibility settings after possible annotation-based overrides
385401
*/
386-
public VisibilityChecker<?> findAutoDetectVisibility(AnnotatedClass ac, VisibilityChecker<?> checker) {
402+
public VisibilityChecker<?> findAutoDetectVisibility(AnnotatedClass ac,
403+
VisibilityChecker<?> checker) {
387404
return checker;
388405
}
389406

@@ -462,22 +479,31 @@ public TypeResolverBuilder<?> findPropertyContentTypeResolver(MapperConfig<?> co
462479
* has to do it if/as necessary)
463480
*
464481
* @param a Annotated entity (class, field/method) to check for annotations
482+
*
483+
* @return List of subtype definitions found if any; {@code null} if none
465484
*/
466485
public List<NamedType> findSubtypes(Annotated a) { return null; }
467486

468487
/**
469488
* Method for checking if specified type has explicit name.
470-
*
489+
*
471490
* @param ac Class to check for type name annotations
491+
*
492+
* @return Explicit type name (aka Type Id) found, if any; {@code null} if none
472493
*/
473494
public String findTypeName(AnnotatedClass ac) { return null; }
474495

475496
/**
476497
* Method for checking whether given accessor claims to represent
477498
* type id: if so, its value may be used as an override,
478499
* instead of generated type id.
500+
*
501+
* @param am Annotated accessor (field/method/constructor parameter) to check for annotations
502+
*
503+
* @return Boolean to indicate whether member is a type id or not, if annotation
504+
* found; {@code null} if no information found.
479505
*/
480-
public Boolean isTypeId(AnnotatedMember member) { return null; }
506+
public Boolean isTypeId(AnnotatedMember am) { return null; }
481507

482508
/*
483509
/**********************************************************
@@ -1295,6 +1321,10 @@ public Class<?> findDeserializationContentType(Annotated ann, JavaType baseConte
12951321
* instantiator, or class of instantiator to create.
12961322
*
12971323
* @param ac Annotated class to introspect
1324+
*
1325+
* @return Either {@link ValueInstantiator} instance to use, or
1326+
* {@link Class} of one to create; or {@code null} if no annotations
1327+
* found to indicate custom value instantiator.
12981328
*/
12991329
public Object findValueInstantiator(AnnotatedClass ac) {
13001330
return null;
@@ -1312,6 +1342,8 @@ public Object findValueInstantiator(AnnotatedClass ac) {
13121342
* to be created for each deserialization call.
13131343
*
13141344
* @param ac Annotated class to introspect
1345+
*
1346+
* @return Builder class to use, if annotation found; {@code null} if not.
13151347
*
13161348
* @since 2.0
13171349
*/
@@ -1322,6 +1354,8 @@ public Class<?> findPOJOBuilder(AnnotatedClass ac) {
13221354
/**
13231355
* @param ac Annotated class to introspect
13241356
*
1357+
* @return Builder settings to use, if any found; {@code null} if not.
1358+
*
13251359
* @since 2.0
13261360
*/
13271361
public JsonPOJOBuilder.Value findPOJOBuilderConfig(AnnotatedClass ac) {
@@ -1344,7 +1378,7 @@ public JsonPOJOBuilder.Value findPOJOBuilderConfig(AnnotatedClass ac) {
13441378
*
13451379
* @param ann Annotated entity to check
13461380
*
1347-
* @return Name to use if found; null if not.
1381+
* @return Name to use if found; {@code null} if not.
13481382
*
13491383
* @since 2.1
13501384
*/
@@ -1360,8 +1394,8 @@ public PropertyName findNameForDeserialization(Annotated ann) {
13601394
*
13611395
* @param ann Annotated entity to check
13621396
*
1363-
* @return True if such annotation is found (and is not disabled),
1364-
* false otherwise
1397+
* @return {@code Boolean.TRUE} or {@code Boolean.FALSE} if explicit
1398+
* "any setter" marker found; {@code null} otherwise.
13651399
*
13661400
* @since 2.9
13671401
*/
@@ -1375,6 +1409,9 @@ public Boolean hasAnySetter(Annotated ann) {
13751409
*
13761410
* @param ann Annotated entity to check
13771411
*
1412+
* @return Setter info value found, if any;
1413+
* {@code JsonSetter.Value.empty()} if none (should not return {@code null})
1414+
*
13781415
* @since 2.9
13791416
*/
13801417
public JsonSetter.Value findSetterInfo(Annotated ann) {
@@ -1386,6 +1423,9 @@ public JsonSetter.Value findSetterInfo(Annotated ann) {
13861423
*
13871424
* @param ann Annotated entity to check
13881425
*
1426+
* @return {@code Boolean.TRUE} or {@code Boolean.FALSE} if explicit
1427+
* merge enable/disable found; {@code null} otherwise.
1428+
*
13891429
* @since 2.9
13901430
*/
13911431
public Boolean findMergeInfo(Annotated ann) {
@@ -1405,6 +1445,8 @@ public Boolean findMergeInfo(Annotated ann) {
14051445
* @param config Configuration settings in effect (for serialization or deserialization)
14061446
* @param ann Annotated accessor (usually constructor or static method) to check
14071447
*
1448+
* @return Creator mode found, if any; {@code null} if none
1449+
*
14081450
* @since 2.9
14091451
*/
14101452
public JsonCreator.Mode findCreatorAnnotation(MapperConfig<?> config, Annotated ann) {
@@ -1446,6 +1488,8 @@ public boolean hasCreatorAnnotation(Annotated ann) {
14461488
* creator with implicit but no explicit name for the argument).
14471489
*
14481490
* @param ann Annotated entity to check
1491+
*
1492+
* @return Creator mode found, if any; {@code null} if none
14491493
*
14501494
* @since 2.5
14511495
* @deprecated Since 2.9 use {@link #findCreatorAnnotation} instead.
@@ -1486,6 +1530,7 @@ public boolean hasAnySetterAnnotation(AnnotatedMethod am) {
14861530
* return annotated.getAnnotation(annoClass);
14871531
*</code>
14881532
*
1533+
* @param <A> Annotation type being checked
14891534
* @param ann Annotated entity to check for specified annotation
14901535
* @param annoClass Type of annotation to find
14911536
*

0 commit comments

Comments
 (0)