Java Code Examples for org.eclipse.jdt.internal.compiler.lookup.ReferenceBinding#isAnonymousType()

The following examples show how to use org.eclipse.jdt.internal.compiler.lookup.ReferenceBinding#isAnonymousType() . 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: TypeElementImpl.java    From Eclipse-Postfix-Code-Completion with Eclipse Public License 1.0 5 votes vote down vote up
@Override
public NestingKind getNestingKind() {
	ReferenceBinding refBinding = (ReferenceBinding)_binding;
	if (refBinding.isAnonymousType()) {
		return NestingKind.ANONYMOUS;
	} else if (refBinding.isLocalType()) {
		return NestingKind.LOCAL;
	} else if (refBinding.isMemberType()) {
		return NestingKind.MEMBER;
	}
	return NestingKind.TOP_LEVEL;
}
 
Example 2
Source File: TypeBinding.java    From Eclipse-Postfix-Code-Completion with Eclipse Public License 1.0 5 votes vote down vote up
public boolean isAnonymous() {
	if (isClass() || isInterface() || isEnum()) {
		ReferenceBinding referenceBinding = (ReferenceBinding) this.binding;
		return referenceBinding.isAnonymousType();
	}
	return false;
}