Java Code Examples for org.eclipse.jdt.internal.compiler.ast.TypeReference#dimensions()
The following examples show how to use
org.eclipse.jdt.internal.compiler.ast.TypeReference#dimensions() .
You can vote up the ones you like or vote down the ones you don't like,
and go to the original project or source file by following the links above each example. You may check out the related API usage on the sidebar.
Example 1
Source File: Eclipse.java From EasyMPermission with MIT License | 4 votes |
/** * Checks if the given type reference represents a primitive type. */ public static boolean isPrimitive(TypeReference ref) { if (ref.dimensions() > 0) return false; return PRIMITIVE_TYPE_NAME_PATTERN.matcher(toQualifiedName(ref.getTypeName())).matches(); }
Example 2
Source File: EclipseHandlerUtil.java From EasyMPermission with MIT License | 4 votes |
public static boolean isBoolean(TypeReference typeReference) { return nameEquals(typeReference.getTypeName(), "boolean") && typeReference.dimensions() == 0; }