Class CombinedTypeSolver.ExceptionHandlers
- java.lang.Object
-
- com.github.javaparser.symbolsolver.resolution.typesolvers.CombinedTypeSolver.ExceptionHandlers
-
- Enclosing class:
- CombinedTypeSolver
public static class CombinedTypeSolver.ExceptionHandlers extends Object
Provides some convenience exception handler implementations
-
-
Field Summary
Fields Modifier and Type Field Description static Predicate<Exception>
IGNORE_ALL
Ignores all exceptionsstatic Predicate<Exception>
IGNORE_NONE
Doesn't ignore any exceptions (default)static Predicate<Exception>
IGNORE_UNSOLVED_SYMBOL
Ignores any exception that isassignable from
UnsolvedSymbolException
.static Predicate<Exception>
IGNORE_UNSUPPORTED_AND_UNSOLVED
Ignores any exception that isassignable from
eitherUnsolvedSymbolException
orUnsupportedOperationException
.static Predicate<Exception>
IGNORE_UNSUPPORTED_OPERATION
Ignores any exception that isassignable from
UnsupportedOperationException
.
-
Constructor Summary
Constructors Constructor Description ExceptionHandlers()
-
Method Summary
All Methods Static Methods Concrete Methods Modifier and Type Method Description static Predicate<Exception>
getTypeBasedBlacklist(Class<? extends Exception>... blacklist)
static Predicate<Exception>
getTypeBasedWhitelist(Class<? extends Exception>... whitelist)
-
-
-
Field Detail
-
IGNORE_NONE
public static final Predicate<Exception> IGNORE_NONE
Doesn't ignore any exceptions (default)
-
IGNORE_UNSUPPORTED_OPERATION
public static final Predicate<Exception> IGNORE_UNSUPPORTED_OPERATION
Ignores any exception that isassignable from
UnsupportedOperationException
.- See Also:
getTypeBasedWhitelist(Class...)
-
IGNORE_UNSOLVED_SYMBOL
public static final Predicate<Exception> IGNORE_UNSOLVED_SYMBOL
Ignores any exception that isassignable from
UnsolvedSymbolException
.- See Also:
getTypeBasedWhitelist(Class...)
-
IGNORE_UNSUPPORTED_AND_UNSOLVED
public static final Predicate<Exception> IGNORE_UNSUPPORTED_AND_UNSOLVED
Ignores any exception that isassignable from
eitherUnsolvedSymbolException
orUnsupportedOperationException
.
-
-
Method Detail
-
getTypeBasedBlacklist
public static Predicate<Exception> getTypeBasedBlacklist(Class<? extends Exception>... blacklist)
- Returns:
- A filter that ignores an exception if none of the listed classes are
assignable from
the thrown exception class. - See Also:
CombinedTypeSolver.setExceptionHandler(Predicate)
,getTypeBasedWhitelist(Class...)
-
getTypeBasedWhitelist
public static Predicate<Exception> getTypeBasedWhitelist(Class<? extends Exception>... whitelist)
- Returns:
- A filter that ignores an exception if any of the listed classes are
assignable from
the thrown exception class. - See Also:
CombinedTypeSolver.setExceptionHandler(Predicate)
,getTypeBasedBlacklist(Class...)
-
-