Skip to main content
aboutsummaryrefslogtreecommitdiffstats
diff options
context:
space:
mode:
Diffstat (limited to 'org.eclipse.jdt.debug/model/org/eclipse/jdt/internal/debug/core/model/JDIInterfaceType.java')
-rw-r--r--org.eclipse.jdt.debug/model/org/eclipse/jdt/internal/debug/core/model/JDIInterfaceType.java102
1 files changed, 64 insertions, 38 deletions
diff --git a/org.eclipse.jdt.debug/model/org/eclipse/jdt/internal/debug/core/model/JDIInterfaceType.java b/org.eclipse.jdt.debug/model/org/eclipse/jdt/internal/debug/core/model/JDIInterfaceType.java
index 74ef82e14..5b151c7fa 100644
--- a/org.eclipse.jdt.debug/model/org/eclipse/jdt/internal/debug/core/model/JDIInterfaceType.java
+++ b/org.eclipse.jdt.debug/model/org/eclipse/jdt/internal/debug/core/model/JDIInterfaceType.java
@@ -10,8 +10,6 @@
*******************************************************************************/
package org.eclipse.jdt.internal.debug.core.model;
-
-import com.ibm.icu.text.MessageFormat;
import java.util.ArrayList;
import java.util.Iterator;
import java.util.List;
@@ -20,90 +18,118 @@ import org.eclipse.debug.core.DebugException;
import org.eclipse.jdt.debug.core.IJavaClassType;
import org.eclipse.jdt.debug.core.IJavaInterfaceType;
+import com.ibm.icu.text.MessageFormat;
import com.sun.jdi.ClassType;
import com.sun.jdi.InterfaceType;
/**
* The interface of an object in a debug target.
*/
-public class JDIInterfaceType extends JDIReferenceType implements IJavaInterfaceType {
-
+public class JDIInterfaceType extends JDIReferenceType implements
+ IJavaInterfaceType {
+
/**
- * Cosntructs a new interface type on the given target referencing
- * the specified interface type.
+ * Constructs a new interface type on the given target referencing the
+ * specified interface type.
*/
public JDIInterfaceType(JDIDebugTarget target, InterfaceType type) {
super(target, type);
}
-
- /* (non-Javadoc)
+
+ /*
+ * (non-Javadoc)
+ *
* @see org.eclipse.jdt.debug.core.IJavaInterfaceType#getImplementors()
*/
public IJavaClassType[] getImplementors() throws DebugException {
try {
- List implementorList = ((InterfaceType)getUnderlyingType()).implementors();
- List javaClassTypeList = new ArrayList(implementorList.size());
- Iterator iterator = implementorList.iterator();
+ List<ClassType> implementorList = ((InterfaceType) getUnderlyingType())
+ .implementors();
+ List<JDIType> javaClassTypeList = new ArrayList<JDIType>(implementorList.size());
+ Iterator<ClassType> iterator = implementorList.iterator();
while (iterator.hasNext()) {
- ClassType classType = (ClassType) iterator.next();
+ ClassType classType = iterator.next();
if (classType != null) {
- javaClassTypeList.add(JDIType.createType(getJavaDebugTarget(), classType));
- }
+ javaClassTypeList.add(JDIType.createType(
+ getJavaDebugTarget(), classType));
+ }
}
- IJavaClassType[] javaClassTypeArray = new IJavaClassType[javaClassTypeList.size()];
- javaClassTypeArray = (IJavaClassType[]) javaClassTypeList.toArray(javaClassTypeArray);
+ IJavaClassType[] javaClassTypeArray = new IJavaClassType[javaClassTypeList
+ .size()];
+ javaClassTypeArray = javaClassTypeList
+ .toArray(javaClassTypeArray);
return javaClassTypeArray;
} catch (RuntimeException re) {
- targetRequestFailed(MessageFormat.format(JDIDebugModelMessages.JDIClassType_exception_while_retrieving_superclass, new String[] {re.toString()}), re);
+ targetRequestFailed(
+ MessageFormat.format(
+ JDIDebugModelMessages.JDIClassType_exception_while_retrieving_superclass,
+ re.toString()), re);
}
return new IJavaClassType[0];
}
- /* (non-Javadoc)
+ /*
+ * (non-Javadoc)
+ *
* @see org.eclipse.jdt.debug.core.IJavaInterfaceType#getSubInterfaces()
*/
public IJavaInterfaceType[] getSubInterfaces() throws DebugException {
try {
- List subList = ((InterfaceType)getUnderlyingType()).subinterfaces();
- List javaInterfaceTypeList = new ArrayList(subList.size());
- Iterator iterator = subList.iterator();
+ List<InterfaceType> subList = ((InterfaceType) getUnderlyingType())
+ .subinterfaces();
+ List<JDIType> javaInterfaceTypeList = new ArrayList<JDIType>(subList.size());
+ Iterator<InterfaceType> iterator = subList.iterator();
while (iterator.hasNext()) {
- InterfaceType interfaceType = (InterfaceType) iterator.next();
+ InterfaceType interfaceType = iterator.next();
if (interfaceType != null) {
- javaInterfaceTypeList.add(JDIType.createType(getJavaDebugTarget(), interfaceType));
- }
+ javaInterfaceTypeList.add(JDIType.createType(
+ getJavaDebugTarget(), interfaceType));
+ }
}
- IJavaInterfaceType[] javaInterfaceTypeArray = new IJavaInterfaceType[javaInterfaceTypeList.size()];
- javaInterfaceTypeArray = (IJavaInterfaceType[]) javaInterfaceTypeList.toArray(javaInterfaceTypeArray);
+ IJavaInterfaceType[] javaInterfaceTypeArray = new IJavaInterfaceType[javaInterfaceTypeList
+ .size()];
+ javaInterfaceTypeArray = javaInterfaceTypeList
+ .toArray(javaInterfaceTypeArray);
return javaInterfaceTypeArray;
} catch (RuntimeException re) {
- targetRequestFailed(MessageFormat.format(JDIDebugModelMessages.JDIClassType_exception_while_retrieving_superclass, new String[] {re.toString()}), re);
+ targetRequestFailed(
+ MessageFormat.format(
+ JDIDebugModelMessages.JDIClassType_exception_while_retrieving_superclass,
+ re.toString()), re);
}
return new IJavaInterfaceType[0];
}
- /* (non-Javadoc)
+ /*
+ * (non-Javadoc)
+ *
* @see org.eclipse.jdt.debug.core.IJavaInterfaceType#getSuperInterfaces()
*/
public IJavaInterfaceType[] getSuperInterfaces() throws DebugException {
try {
- List superList = ((InterfaceType)getUnderlyingType()).superinterfaces();
- List javaInterfaceTypeList = new ArrayList(superList.size());
- Iterator iterator = superList.iterator();
+ List<InterfaceType> superList = ((InterfaceType) getUnderlyingType())
+ .superinterfaces();
+ List<JDIType> javaInterfaceTypeList = new ArrayList<JDIType>(superList.size());
+ Iterator<InterfaceType> iterator = superList.iterator();
while (iterator.hasNext()) {
- InterfaceType interfaceType = (InterfaceType) iterator.next();
+ InterfaceType interfaceType = iterator.next();
if (interfaceType != null) {
- javaInterfaceTypeList.add(JDIType.createType(getJavaDebugTarget(), interfaceType));
- }
+ javaInterfaceTypeList.add(JDIType.createType(
+ getJavaDebugTarget(), interfaceType));
+ }
}
- IJavaInterfaceType[] javaInterfaceTypeArray = new IJavaInterfaceType[javaInterfaceTypeList.size()];
- javaInterfaceTypeArray = (IJavaInterfaceType[]) javaInterfaceTypeList.toArray(javaInterfaceTypeArray);
+ IJavaInterfaceType[] javaInterfaceTypeArray = new IJavaInterfaceType[javaInterfaceTypeList
+ .size()];
+ javaInterfaceTypeArray = javaInterfaceTypeList
+ .toArray(javaInterfaceTypeArray);
return javaInterfaceTypeArray;
} catch (RuntimeException re) {
- targetRequestFailed(MessageFormat.format(JDIDebugModelMessages.JDIClassType_exception_while_retrieving_superclass, new String[] {re.toString()}), re);
+ targetRequestFailed(
+ MessageFormat.format(
+ JDIDebugModelMessages.JDIClassType_exception_while_retrieving_superclass,
+ re.toString()), re);
}
return new IJavaInterfaceType[0];
}
}
-

Back to the top