Top Description Inners Fields Constructors Methods
io.github.classgraph

public Class FieldInfoList

extends MappableInfoList<FieldInfo>
Class Inheritance
Imports
java.util.Collection, .Map, .Set, nonapi.io.github.classgraph.utils.LogNode

A list of FieldInfo objects.

Nested and Inner Type Summary

Modifier and TypeClass and Description
public static interface
FieldInfoList.FieldInfoFilter

Filter an FieldInfoList using a predicate mapping an FieldInfo object to a boolean, producing another FieldInfoList for all items in the list for which the predicate is true.

Field Summary

Modifier and TypeField and Description
pack-priv static final FieldInfoList
EMPTY_LIST

An unmodifiable empty FieldInfoList.

private static final long

Constructor Summary

AccessConstructor and Description
public
FieldInfoList()

Construct a new modifiable empty list of FieldInfo objects.

public
FieldInfoList(final int
the size hint
sizeHint
)

Construct a new modifiable empty list of FieldInfo objects, given a size hint.

public
FieldInfoList(final Collection<FieldInfo>
the collection of FieldInfo objects.
fieldInfoCollection
)

Construct a new modifiable empty FieldInfoList, given an initial list of FieldInfo objects.

Method Summary

Modifier and TypeMethod and Description
public static FieldInfoList

Returns:

the unmodifiable empty FieldInfoList.
emptyList
()

Return an unmodifiable empty FieldInfoList.

public FieldInfoList

Returns:

The subset of the FieldInfo objects in this list for which the given filter predicate is true.
filter
(final FieldInfoList.FieldInfoFilter
The FieldInfoFilter to apply.
filter
)

Find the subset of the FieldInfo objects in this list for which the given filter predicate is true.

protected void
findReferencedClassInfo(final Map<String, ClassInfo>
the map from class name to ClassInfo.
classNameToClassInfo
,
final Set<ClassInfo>
the referenced class info
refdClassInfo
,
final LogNode
the log
log
)

Get ClassInfo objects for any classes referenced in the list.

Inherited from io.github.classgraph.MappableInfoList:
asMapcontainsNameget

Field Detail

EMPTY_LISTback to summary
pack-priv static final FieldInfoList EMPTY_LIST

An unmodifiable empty FieldInfoList.

serialVersionUIDback to summary
private static final long serialVersionUID

Hides io.github.classgraph.MappableInfoList.serialVersionUID.

serialVersionUID

Constructor Detail

FieldInfoListback to summary
public FieldInfoList()

Construct a new modifiable empty list of FieldInfo objects.

FieldInfoListback to summary
public FieldInfoList(final int sizeHint)

Construct a new modifiable empty list of FieldInfo objects, given a size hint.

Parameters
sizeHint:int

the size hint

FieldInfoListback to summary
public FieldInfoList(final Collection<FieldInfo> fieldInfoCollection)

Construct a new modifiable empty FieldInfoList, given an initial list of FieldInfo objects.

Parameters
fieldInfoCollection:Collection<FieldInfo>

the collection of FieldInfo objects.

Method Detail

emptyListback to summary
public static FieldInfoList emptyList()

Return an unmodifiable empty FieldInfoList.

Returns:FieldInfoList

the unmodifiable empty FieldInfoList.

filterback to summary
public FieldInfoList filter(final FieldInfoList.FieldInfoFilter filter)

Find the subset of the FieldInfo objects in this list for which the given filter predicate is true.

Parameters
filter:FieldInfoList.FieldInfoFilter

The FieldInfoFilter to apply.

Returns:FieldInfoList

The subset of the FieldInfo objects in this list for which the given filter predicate is true.

findReferencedClassInfoback to summary
protected void findReferencedClassInfo(final Map<String, ClassInfo> classNameToClassInfo, final Set<ClassInfo> refdClassInfo, final LogNode log)

Get ClassInfo objects for any classes referenced in the list.

Parameters
classNameToClassInfo:Map<String, ClassInfo>

the map from class name to ClassInfo.

refdClassInfo:Set<ClassInfo>

the referenced class info

log:LogNode

the log

io.github.classgraph back to summary

public Interface FieldInfoList.FieldInfoFilter

Annotations
@FunctionalInterface

Filter an FieldInfoList using a predicate mapping an FieldInfo object to a boolean, producing another FieldInfoList for all items in the list for which the predicate is true.

Method Summary

Modifier and TypeMethod and Description
public boolean

Returns:

Whether or not to allow the item through the filter. If true, the item is copied to the output list; if false, it is excluded.
accept
(FieldInfo
The FieldInfo item to filter.
fieldInfo
)

Whether or not to allow an FieldInfo list item through the filter.

Method Detail

acceptback to summary
public boolean accept(FieldInfo fieldInfo)

Whether or not to allow an FieldInfo list item through the filter.

Parameters
fieldInfo:FieldInfo

The FieldInfo item to filter.

Returns:boolean

Whether or not to allow the item through the filter. If true, the item is copied to the output list; if false, it is excluded.