com.jrockit.mc.flightrecorder.provider
Class Field

java.lang.Object
  extended by com.jrockit.mc.flightrecorder.provider.Field
All Implemented Interfaces:
IField
Direct Known Subclasses:
ConstantField, DurationField, EndTimeField, EventTypeField, EventTypePathField, ProducerField, ProducerURIField, ReferenceField, StartTimeField

public abstract class Field
extends java.lang.Object
implements IField

Abstract base class for fields.

Author:
Erik Gahlin

Constructor Summary
Field(IEventType type, java.lang.String identifier)
           
Field(java.lang.String path, java.lang.String identifier)
           
 
Method Summary
 boolean equals(java.lang.Object object)
           
 java.lang.String getContentType()
          Returns the content type
 java.lang.String getDescription()
          Return a description of the field.
 java.lang.String getEventTypePath()
          Returns the event type path for the event type.
 java.lang.String getIdentifier()
          Returns the identifier for the field.
 java.lang.String getName()
          Returns a human readable name of the field.
 java.util.Set<java.lang.String> getPropertyKeys()
          Returns the property keys available for the field.
 java.lang.Object getPropertyValue(java.lang.String key)
          Returns the property value for the field.
 java.lang.String getRelationalKey()
          Return the relation key for the field, or null if not available.
 FieldType getType()
          Returns the type of the field.
abstract  java.lang.Object getValue(IEvent event)
          Returns a field value for an event
 int hashCode()
           
 boolean isRelational()
          Returns true If the field has a relational key.
 boolean isSynthetic()
          Returns true if the field is synthetic.
 boolean isVisible()
          Return true if the field should be visible.
 void setContentType(java.lang.String contentType)
           
 void setDescription(java.lang.String description)
           
 void setFieldType(FieldType fieldType)
           
 void setName(java.lang.String name)
           
 void setPath(java.lang.String path)
           
 void setProperty(java.lang.String key, java.lang.Object value)
           
 void setRelationalKey(java.lang.String relationalKey)
           
 void setSynthetic(boolean synthetic)
           
 void setVisible(boolean visible)
           
 
Methods inherited from class java.lang.Object
clone, finalize, getClass, notify, notifyAll, toString, wait, wait, wait
 

Constructor Detail

Field

public Field(IEventType type,
             java.lang.String identifier)

Field

public Field(java.lang.String path,
             java.lang.String identifier)
Method Detail

getValue

public abstract java.lang.Object getValue(IEvent event)
Description copied from interface: IField
Returns a field value for an event

Specified by:
getValue in interface IField
Parameters:
event - the event
Returns:
value the value

getPropertyKeys

public final java.util.Set<java.lang.String> getPropertyKeys()
Description copied from interface: IField
Returns the property keys available for the field.

Specified by:
getPropertyKeys in interface IField
Returns:
the property keys for the field

getPropertyValue

public final java.lang.Object getPropertyValue(java.lang.String key)
Description copied from interface: IField
Returns the property value for the field.

Specified by:
getPropertyValue in interface IField
Returns:
the value associated with key, or null if not available.

isVisible

public final boolean isVisible()
Description copied from interface: IField
Return true if the field should be visible.

Specified by:
isVisible in interface IField
Returns:
true if visible, false otherwise

setSynthetic

public final void setSynthetic(boolean synthetic)

setVisible

public final void setVisible(boolean visible)

setFieldType

public final void setFieldType(FieldType fieldType)

getType

public final FieldType getType()
Description copied from interface: IField
Returns the type of the field. See FieldType for more information.

Specified by:
getType in interface IField
Returns:
the type
See Also:
FieldType

getName

public final java.lang.String getName()
Description copied from interface: IField
Returns a human readable name of the field.

Specified by:
getName in interface IField
Returns:
the name

getDescription

public final java.lang.String getDescription()
Description copied from interface: IField
Return a description of the field.

Specified by:
getDescription in interface IField
Returns:
the description.

getIdentifier

public final java.lang.String getIdentifier()
Description copied from interface: IField
Returns the identifier for the field.

Specified by:
getIdentifier in interface IField
Returns:
the identifier for the field

getContentType

public final java.lang.String getContentType()
Description copied from interface: IField
Returns the content type

Specified by:
getContentType in interface IField
Returns:
the content type

getEventTypePath

public final java.lang.String getEventTypePath()
Description copied from interface: IField
Returns the event type path for the event type.

Specified by:
getEventTypePath in interface IField
Returns:
the event type path

setName

public final void setName(java.lang.String name)

setDescription

public final void setDescription(java.lang.String description)

setContentType

public final void setContentType(java.lang.String contentType)

isRelational

public final boolean isRelational()
Description copied from interface: IField
Returns true If the field has a relational key.

Specified by:
isRelational in interface IField
Returns:
true if the field is relational, false otherwise

isSynthetic

public final boolean isSynthetic()
Description copied from interface: IField
Returns true if the field is synthetic.

Specified by:
isSynthetic in interface IField
Returns:
true if the field is synthetic

getRelationalKey

public final java.lang.String getRelationalKey()
Description copied from interface: IField
Return the relation key for the field, or null if not available.

Specified by:
getRelationalKey in interface IField
Returns:
the relational key for the field.

setRelationalKey

public void setRelationalKey(java.lang.String relationalKey)

equals

public final boolean equals(java.lang.Object object)
Overrides:
equals in class java.lang.Object

hashCode

public final int hashCode()
Overrides:
hashCode in class java.lang.Object

setPath

public void setPath(java.lang.String path)

setProperty

public void setProperty(java.lang.String key,
                        java.lang.Object value)


Copyright © 1999, 2011, Oracle and/or its affiliates. All rights reserved.