KickJava   Java API By Example, From Geeks To Geeks.

Java > Open Source Codes > org > eclipse > jdt > internal > core > util > AnnotationDefaultAttribute


1 /*******************************************************************************
2  * Copyright (c) 2000, 2006 IBM Corporation and others.
3  * All rights reserved. This program and the accompanying materials
4  * are made available under the terms of the Eclipse Public License v1.0
5  * which accompanies this distribution, and is available at
6  * http://www.eclipse.org/legal/epl-v10.html
7  *
8  * Contributors:
9  * IBM Corporation - initial API and implementation
10  *******************************************************************************/

11 package org.eclipse.jdt.internal.core.util;
12
13 import org.eclipse.jdt.core.util.ClassFormatException;
14 import org.eclipse.jdt.core.util.IAnnotationComponentValue;
15 import org.eclipse.jdt.core.util.IAnnotationDefaultAttribute;
16 import org.eclipse.jdt.core.util.IConstantPool;
17
18 /**
19  * Default implementation of AnnotationDefaultAttribute.
20  *
21  * @since 3.0
22  */

23 public class AnnotationDefaultAttribute extends ClassFileAttribute
24         implements
25             IAnnotationDefaultAttribute {
26
27     private IAnnotationComponentValue memberValue;
28     
29     /**
30      * Constructor for AnnotationDefaultAttribute.
31      * @param classFileBytes
32      * @param constantPool
33      * @param offset
34      * @throws ClassFormatException
35      */

36     public AnnotationDefaultAttribute(
37             byte[] classFileBytes,
38             IConstantPool constantPool,
39             int offset)
40             throws ClassFormatException {
41         super(classFileBytes, constantPool, offset);
42         this.memberValue = new AnnotationComponentValue(classFileBytes, constantPool, offset + 6);
43     }
44     
45     /* (non-Javadoc)
46      * @see org.eclipse.jdt.core.util.IAnnotationDefaultAttribute#getMemberValue()
47      */

48     public IAnnotationComponentValue getMemberValue() {
49         return this.memberValue;
50     }
51 }
52
Popular Tags