public class EntitySelectionPredicates extends java.lang.Object
EntitySelectionExpressionParser
. Each expression is defined by a
public static method of same name. Methods found here must be parameterless
or accept a single string parameter and must return an Predicate
over
ShallowEntity
. To avoid clashes with Java keywords, an optional
prefix "select" may be used.
Note that the comments for the public methods describe not exactly the
function, but rather the returned predicate.Constructor and Description |
---|
EntitySelectionPredicates() |
Modifier and Type | Method and Description |
---|---|
static java.util.function.Predicate<ShallowEntity> |
annotated(java.lang.String annotationName)
Matches all entities that are annotated with an annotation of given name
(excluding the '@' sign).
|
static java.util.function.Predicate<ShallowEntity> |
attribute()
Selects all attributes.
|
static java.util.function.Predicate<ShallowEntity> |
declaration()
Selects all shallow entities whose subtype is a declaration.
|
static java.util.function.Predicate<ShallowEntity> |
export()
Matches all export entities.
|
static java.util.function.Predicate<ShallowEntity> |
fileRegex(java.lang.String regex)
Matches entities by their file name
|
static java.util.function.Predicate<ShallowEntity> |
internal()
Selects all shallow entities that are internal (C# keyword).
|
static java.util.function.Predicate<ShallowEntity> |
isAbstract() |
static java.util.function.Predicate<ShallowEntity> |
language(java.lang.String languageName)
Selects entities in files with the given language.
|
static java.util.function.Predicate<ShallowEntity> |
meta()
Selects all meta information (defines, annotations, etc.).
|
static java.util.function.Predicate<ShallowEntity> |
method()
Selects all methods/functions.
|
static java.util.function.Predicate<ShallowEntity> |
module()
Selects all modules/namespaces.
|
static java.util.function.Predicate<ShallowEntity> |
name(java.lang.String name)
Matches entities by their name.
|
static java.util.function.Predicate<ShallowEntity> |
nameRegex(java.lang.String regex)
Matches entities by their name using regular expression.
|
static java.util.function.Predicate<ShallowEntity> |
primitive()
Matches all primitive entities (i.e.
|
static java.util.function.Predicate<ShallowEntity> |
property()
Selects all properties, defined attributes that have only method children.
|
static java.util.function.Predicate<ShallowEntity> |
selectDefault()
Matches all entities with default visibility.
|
static java.util.function.Predicate<ShallowEntity> |
selectFinal()
Matches all final entities.
|
static java.util.function.Predicate<ShallowEntity> |
selectOverride()
Matches all entities marked with override.
|
static java.util.function.Predicate<ShallowEntity> |
selectPrivate()
Matches all private entities (except the TypeScript constructor parameters).
|
static java.util.function.Predicate<ShallowEntity> |
selectProtected()
Matches all protected entities.
|
static java.util.function.Predicate<ShallowEntity> |
selectPublic()
Matches all public entities as well as methods inside interfaces, which are
considered public in most languages.
|
static java.util.function.Predicate<ShallowEntity> |
selectStatic()
Matches all static entities.
|
static java.util.function.Predicate<ShallowEntity> |
simpleCSharpGetter()
Matches getter in CSharp generated by the automatic property generation
feature.
|
static java.util.function.Predicate<ShallowEntity> |
simpleCSharpSetter()
Matches setter in CSharp generated by the automatic property generation
feature.
|
static java.util.function.Predicate<ShallowEntity> |
simpleGetter()
Matches simple getters, i.e.
|
static java.util.function.Predicate<ShallowEntity> |
simpleGetterCaseInsensitive()
Matches simple getters, i.e.
|
static java.util.function.Predicate<ShallowEntity> |
simpleMethod(java.lang.String namePrefix)
Matches simple methods with the given prefix.
|
static java.util.function.Predicate<ShallowEntity> |
simpleMethodCaseInsensitive(java.lang.String namePrefix)
Matches simple methods with the given prefix (case insensitive).
|
static java.util.function.Predicate<ShallowEntity> |
simpleSetter()
Matches simple setters, i.e.
|
static java.util.function.Predicate<ShallowEntity> |
simpleSetterCaseInsensitive()
Matches simple setters, i.e.
|
static java.util.function.Predicate<ShallowEntity> |
statement()
Selects all statements.
|
static java.util.function.Predicate<ShallowEntity> |
subtype(java.lang.String subtype)
Matches entities by their subtype.
|
static java.util.function.Predicate<ShallowEntity> |
type()
Selects all types/classes.
|
static java.util.function.Predicate<ShallowEntity> |
typeExported()
Matches entities whose parent is an exported type.
|
static java.util.function.Predicate<ShallowEntity> |
typeSubtype(java.lang.String subtype)
Matches entities by their parent type's subtype (e.g.
|
public EntitySelectionPredicates()
public static java.util.function.Predicate<ShallowEntity> language(java.lang.String languageName)
public static java.util.function.Predicate<ShallowEntity> module()
public static java.util.function.Predicate<ShallowEntity> type()
public static java.util.function.Predicate<ShallowEntity> method()
public static java.util.function.Predicate<ShallowEntity> declaration()
public static java.util.function.Predicate<ShallowEntity> internal()
public static java.util.function.Predicate<ShallowEntity> attribute()
public static java.util.function.Predicate<ShallowEntity> property()
public static java.util.function.Predicate<ShallowEntity> statement()
public static java.util.function.Predicate<ShallowEntity> meta()
public static java.util.function.Predicate<ShallowEntity> selectPublic()
public static java.util.function.Predicate<ShallowEntity> isAbstract()
public static java.util.function.Predicate<ShallowEntity> selectProtected()
public static java.util.function.Predicate<ShallowEntity> selectOverride()
public static java.util.function.Predicate<ShallowEntity> selectPrivate()
public static java.util.function.Predicate<ShallowEntity> selectDefault()
public static java.util.function.Predicate<ShallowEntity> selectFinal()
public static java.util.function.Predicate<ShallowEntity> selectStatic()
public static java.util.function.Predicate<ShallowEntity> export()
public static java.util.function.Predicate<ShallowEntity> primitive()
public static java.util.function.Predicate<ShallowEntity> subtype(java.lang.String subtype)
public static java.util.function.Predicate<ShallowEntity> typeSubtype(java.lang.String subtype)
public static java.util.function.Predicate<ShallowEntity> typeExported()
public static java.util.function.Predicate<ShallowEntity> name(java.lang.String name)
public static java.util.function.Predicate<ShallowEntity> nameRegex(java.lang.String regex)
public static java.util.function.Predicate<ShallowEntity> fileRegex(java.lang.String regex)
public static java.util.function.Predicate<ShallowEntity> annotated(java.lang.String annotationName)
public static java.util.function.Predicate<ShallowEntity> simpleGetter()
public static java.util.function.Predicate<ShallowEntity> simpleSetter()
public static java.util.function.Predicate<ShallowEntity> simpleSetterCaseInsensitive()
public static java.util.function.Predicate<ShallowEntity> simpleGetterCaseInsensitive()
public static java.util.function.Predicate<ShallowEntity> simpleCSharpGetter()
public static java.util.function.Predicate<ShallowEntity> simpleCSharpSetter()
public static java.util.function.Predicate<ShallowEntity> simpleMethod(java.lang.String namePrefix)
public static java.util.function.Predicate<ShallowEntity> simpleMethodCaseInsensitive(java.lang.String namePrefix)