public final class JdtUtil extends Object
Modifier and Type | Method and Description |
---|---|
static String |
asDottedString(char[][] name)
Returns a source name from an array of names.
|
static String |
bindingToResourcePath(org.eclipse.jdt.internal.compiler.lookup.ReferenceBinding binding)
Returns the relative file path for the resource of the compilation unit that defines
binding . |
static String |
formatBinding(org.eclipse.jdt.internal.compiler.lookup.MethodBinding methodBinding) |
static String |
formatMethodSignature(org.eclipse.jdt.internal.compiler.lookup.MethodBinding methodBinding)
Get a readable method description from
methodBinding conforming with JSNI formatting. |
static org.eclipse.jdt.internal.compiler.lookup.AnnotationBinding |
getAnnotation(org.eclipse.jdt.internal.compiler.lookup.Binding binding,
String nameToFind) |
static boolean |
getAnnotationParameterBoolean(org.eclipse.jdt.internal.compiler.lookup.AnnotationBinding a,
String paramName) |
static String |
getAnnotationParameterString(org.eclipse.jdt.internal.compiler.lookup.AnnotationBinding a,
String paramName) |
static org.eclipse.jdt.internal.compiler.lookup.TypeBinding |
getAnnotationParameterTypeBinding(org.eclipse.jdt.internal.compiler.lookup.AnnotationBinding a,
String paramName) |
static org.eclipse.jdt.internal.compiler.lookup.TypeBinding[] |
getAnnotationParameterTypeBindingArray(org.eclipse.jdt.internal.compiler.lookup.AnnotationBinding annotationBinding,
String paramName) |
static String |
getDefiningCompilationUnitType(org.eclipse.jdt.internal.compiler.lookup.ReferenceBinding binding)
Returns the top type of the compilation unit that defines
binding . |
static String |
getSourceName(org.eclipse.jdt.internal.compiler.lookup.TypeBinding classBinding) |
static boolean |
isInnerClass(org.eclipse.jdt.internal.compiler.lookup.ReferenceBinding binding) |
static String |
join(char[][] name,
String separator)
Returns a string name from an array of names using
separator . |
static org.eclipse.jdt.internal.compiler.ast.AbstractMethodDeclaration |
safeSourceMethod(org.eclipse.jdt.internal.compiler.lookup.MethodBinding mb)
Work around JDT bug.
|
public static String asDottedString(char[][] name)
public static String join(char[][] name, String separator)
separator
.public static String bindingToResourcePath(org.eclipse.jdt.internal.compiler.lookup.ReferenceBinding binding)
binding
.public static String getDefiningCompilationUnitType(org.eclipse.jdt.internal.compiler.lookup.ReferenceBinding binding)
binding
.public static String getSourceName(org.eclipse.jdt.internal.compiler.lookup.TypeBinding classBinding)
public static boolean isInnerClass(org.eclipse.jdt.internal.compiler.lookup.ReferenceBinding binding)
public static String formatMethodSignature(org.eclipse.jdt.internal.compiler.lookup.MethodBinding methodBinding)
methodBinding
conforming with JSNI formatting.
See examples:
public static String formatBinding(org.eclipse.jdt.internal.compiler.lookup.MethodBinding methodBinding)
public static String getAnnotationParameterString(org.eclipse.jdt.internal.compiler.lookup.AnnotationBinding a, String paramName)
public static boolean getAnnotationParameterBoolean(org.eclipse.jdt.internal.compiler.lookup.AnnotationBinding a, String paramName)
public static org.eclipse.jdt.internal.compiler.lookup.AnnotationBinding getAnnotation(org.eclipse.jdt.internal.compiler.lookup.Binding binding, String nameToFind)
public static org.eclipse.jdt.internal.compiler.lookup.TypeBinding getAnnotationParameterTypeBinding(org.eclipse.jdt.internal.compiler.lookup.AnnotationBinding a, String paramName)
public static org.eclipse.jdt.internal.compiler.lookup.TypeBinding[] getAnnotationParameterTypeBindingArray(org.eclipse.jdt.internal.compiler.lookup.AnnotationBinding annotationBinding, String paramName)
public static org.eclipse.jdt.internal.compiler.ast.AbstractMethodDeclaration safeSourceMethod(org.eclipse.jdt.internal.compiler.lookup.MethodBinding mb)
Copyright © 2018. All rights reserved.