Skip to main content
summaryrefslogtreecommitdiffstats
diff options
context:
space:
mode:
Diffstat (limited to 'common/plugins/org.eclipse.jpt.common.core/src/org/eclipse/jpt/common/core/internal/resource/java/binary/BinaryEnumConstant.java')
-rw-r--r--common/plugins/org.eclipse.jpt.common.core/src/org/eclipse/jpt/common/core/internal/resource/java/binary/BinaryEnumConstant.java84
1 files changed, 0 insertions, 84 deletions
diff --git a/common/plugins/org.eclipse.jpt.common.core/src/org/eclipse/jpt/common/core/internal/resource/java/binary/BinaryEnumConstant.java b/common/plugins/org.eclipse.jpt.common.core/src/org/eclipse/jpt/common/core/internal/resource/java/binary/BinaryEnumConstant.java
deleted file mode 100644
index eae0c24578..0000000000
--- a/common/plugins/org.eclipse.jpt.common.core/src/org/eclipse/jpt/common/core/internal/resource/java/binary/BinaryEnumConstant.java
+++ /dev/null
@@ -1,84 +0,0 @@
-/*******************************************************************************
- * Copyright (c) 2010, 2011 Oracle. All rights reserved.
- * This program and the accompanying materials are made available under the
- * terms of the Eclipse Public License v1.0, which accompanies this distribution
- * and is available at http://www.eclipse.org/legal/epl-v10.html.
- *
- * Contributors:
- * Oracle - initial API and implementation
- ******************************************************************************/
-package org.eclipse.jpt.common.core.internal.resource.java.binary;
-
-import org.eclipse.jdt.core.IAnnotation;
-import org.eclipse.jdt.core.IField;
-import org.eclipse.jdt.core.ITypeParameter;
-import org.eclipse.jdt.core.JavaModelException;
-import org.eclipse.jpt.common.core.JptCommonCorePlugin;
-import org.eclipse.jpt.common.core.resource.java.JavaResourceEnum;
-import org.eclipse.jpt.common.core.resource.java.JavaResourceEnumConstant;
-import org.eclipse.jpt.common.utility.internal.iterables.ArrayIterable;
-import org.eclipse.jpt.common.utility.internal.iterables.EmptyIterable;
-
-/**
- * Java binary enum constant, IField that returns true to isEnumConstant
- */
-final class BinaryEnumConstant
- extends BinaryMember
- implements JavaResourceEnumConstant {
-
-
-
- BinaryEnumConstant(JavaResourceEnum parent, IField enumConstant){
- super(parent, new EnumConstantAdapter(enumConstant));
- }
-
- @Override
- IField getMember() {
- return (IField) super.getMember();
- }
-
- // ******** JavaResourceAnnotatedElement implementation ********
-
- public Kind getKind() {
- return Kind.ENUM_CONSTANT;
- }
-
-
- // ******** JavaResourceEnumConstant implementation ********
-
- public String getName() {
- return this.getMember().getElementName();
- }
-
-
- // ********** IField adapter **********
-
- static class EnumConstantAdapter
- implements Adapter {
-
- private final IField enumConstant;
-
- EnumConstantAdapter(IField enumConstant) {
- super();
- this.enumConstant = enumConstant;
- }
-
- public IField getElement() {
- return this.enumConstant;
- }
-
- public Iterable<ITypeParameter> getTypeParameters() {
- try {
- return new ArrayIterable<ITypeParameter>(this.enumConstant.getDeclaringType().getTypeParameters());
- }
- catch (JavaModelException jme) {
- JptCommonCorePlugin.log(jme);
- }
- return EmptyIterable.instance();
- }
-
- public IAnnotation[] getAnnotations() throws JavaModelException {
- return this.enumConstant.getAnnotations();
- }
- }
-}

Back to the top