Class ValueField
- java.lang.Object
-
- org.openjdk.jmc.flightrecorder.parser.ValueField
-
public final class ValueField extends java.lang.Object
A descriptor of a value field for use inIEventSinkFactory.create
.
-
-
Field Summary
Fields Modifier and Type Field Description private ContentType<?>
contentType
private java.lang.String
description
private java.lang.String
identifier
private java.lang.String
name
-
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.String
getDescription()
java.lang.String
getIdentifier()
java.lang.String
getName()
boolean
matches(IAttribute<?> a)
Check if a value field matches an attribute.java.lang.String
toString()
-
-
-
Field Detail
-
identifier
private final java.lang.String identifier
-
name
private final java.lang.String name
-
description
private final java.lang.String description
-
contentType
private final ContentType<?> contentType
-
-
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:
true
if the value field and the attribute match,false
if not
-
toString
public java.lang.String toString()
- Overrides:
toString
in classjava.lang.Object
-
-