public final class IntrospectionComponentFormatter extends ComponentFormatterTemplate
Component. This formatter
does not support nested properties.| Constructor and Description |
|---|
IntrospectionComponentFormatter(Class<? extends Component> targetType,
String... propertyNames)
Creates a new
IntrospectionComponentFormatter. |
| Modifier and Type | Method and Description |
|---|---|
protected String |
doFormat(Component c)
Returns a
String representation of the given AWT or Swing Component, showing only the properties
specified in this formatter's constructor. |
Class<? extends Component> |
targetType()
Returns the type of AWT or Swing
Component this formatter supports. |
String |
toString() |
format, getRealClassNamepublic IntrospectionComponentFormatter(@Nonnull Class<? extends Component> targetType, @Nonnull String... propertyNames)
IntrospectionComponentFormatter.targetType - the type of AWT or Swing Component that this formatter supports.propertyNames - the property names to show as the String representation of a given Component.NullPointerException - if targetType is null.@RunsInCurrentThread @Nonnull protected String doFormat(@Nonnull Component c)
String representation of the given AWT or Swing Component, showing only the properties
specified in this formatter's constructor.doFormat in class ComponentFormatterTemplatec - the given Component.String representation of the given Component.NullPointerException - if the given Component is null.IllegalArgumentException - if the type of the given Component is not supported by this formatter.targetType()@Nonnull public Class<? extends Component> targetType()
ComponentFormatterComponent this formatter supports.Component this formatter supports.Copyright © 2014–2019 AssertJ. All rights reserved.