Class ValueField
- java.lang.Object
-
- org.openjdk.jmc.flightrecorder.parser.ValueField
-
public final class ValueField extends java.lang.ObjectA descriptor of a value field for use inIEventSinkFactory.create.
-
-
Constructor Summary
Constructors Constructor Description ValueField(java.lang.String identifier, java.lang.String name, java.lang.String description, ContentType<?> contentType)Create a value field.ValueField(IAttribute<?> attribute)Create a value field matching anIAttribute.
-
Method Summary
All Methods Instance Methods Concrete Methods Modifier and Type Method Description ContentType<?>getContentType()java.lang.StringgetDescription()java.lang.StringgetIdentifier()java.lang.StringgetName()booleanmatches(IAttribute<?> a)Check if a value field matches an attribute.java.lang.StringtoString()
-
-
-
Constructor Detail
-
ValueField
public ValueField(IAttribute<?> attribute)
Create a value field matching anIAttribute.- Parameters:
attribute- attribute to match
-
ValueField
public ValueField(java.lang.String identifier, java.lang.String name, java.lang.String description, ContentType<?> contentType)Create a value field.- Parameters:
identifier- field IDname- human readable field namedescription- human readable field descriptioncontentType- content type of the field
-
-
Method Detail
-
getIdentifier
public java.lang.String getIdentifier()
-
getName
public java.lang.String getName()
-
getDescription
public java.lang.String getDescription()
-
getContentType
public ContentType<?> getContentType()
-
matches
public boolean matches(IAttribute<?> a)
Check if a value field matches an attribute. Note that only ID and content type is checked since human readable values may differ, especially due to translations.- Parameters:
a- attribute to match- Returns:
trueif the value field and the attribute match,falseif not
-
toString
public java.lang.String toString()
- Overrides:
toStringin classjava.lang.Object
-
-