Package org.kohsuke.stapler.export
Class ModelBuilder
java.lang.Object
org.kohsuke.stapler.export.ModelBuilder
Creates and maintains
Model
s, that are used to write out
the value representation of exposed beans
.- Author:
- Kohsuke Kawaguchi
-
Constructor Summary
-
Method Summary
Modifier and TypeMethodDescription<T> Model<T>
<T> Model<T>
<T> Model<T>
Instead of throwingNotExportableException
this method will return null This should be used on hot paths where throwing the exception and catching it would incur a performance hit
-
Constructor Details
-
ModelBuilder
public ModelBuilder()
-
-
Method Details
-
get
- Throws:
NotExportableException
-
get
@NonNull public <T> Model<T> get(Class<T> type, @CheckForNull Class<?> propertyOwner, @Nullable String property) throws NotExportableException - Returns:
- model
- Throws:
NotExportableException
- if type is not exportable
-
getOrNull
@CheckForNull public <T> Model<T> getOrNull(Class<T> type, @CheckForNull Class<?> propertyOwner, @Nullable String property) Instead of throwingNotExportableException
this method will return null This should be used on hot paths where throwing the exception and catching it would incur a performance hit- Returns:
- model
- Since:
- 1.253
-