001/* 002 * This file is part of the Tuning Fork Visualization Platform 003 * (http://sourceforge.net/projects/tuningforkvp) 004 * 005 * Copyright (c) 2005 - 2008 IBM Corporation. 006 * All rights reserved. This program and the accompanying materials 007 * are made available under the terms of the Eclipse Public License v1.0 008 * which accompanies this distribution, and is available at 009 * http://www.eclipse.org/legal/epl-v10.html 010 * 011 * Contributors: 012 * IBM Corporation - initial API and implementation 013 */ 014 015package com.ibm.tuningfork.tracegen.types; 016 017import org.vmmagic.pragma.Uninterruptible; 018 019 020/** 021 * An attribute of an EventType. 022 */ 023@Uninterruptible 024public final class EventAttribute { 025 026 private final String name; 027 private final String description; 028 private final ScalarType type; 029 030 /** 031 * Create an EventAttribute with the specified name, description and type. 032 * 033 * @param name 034 * The name of the attribute. 035 * @param description 036 * A description of the attribute. 037 * @param type 038 * The type of the attribute. 039 */ 040 public EventAttribute(final String name, final String description, 041 final ScalarType type) { 042 this.name = name; 043 this.description = description; 044 this.type = type; 045 } 046 047 /** 048 * Return the name of the attribute. 049 * 050 * @return The name of the attribute. 051 */ 052 public final String getName() { 053 return name; 054 } 055 056 /** 057 * Return the description of the attribute. 058 * 059 * @return The description of the attribute. 060 */ 061 public final String getDescription() { 062 return description; 063 } 064 065 /** 066 * Return the type of the attribute. 067 * 068 * @return The type of the attribute. 069 */ 070 public final ScalarType getType() { 071 return type; 072 } 073}