org.eclipse.jdt.internal.compiler.ast.TrueLiteral Java Examples

The following examples show how to use org.eclipse.jdt.internal.compiler.ast.TrueLiteral. 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: HandleBuilder.java    From EasyMPermission with MIT License 4 votes vote down vote up
private static final boolean toBoolean(Object expr, boolean defaultValue) {
	if (expr == null) return defaultValue;
	if (expr instanceof FalseLiteral) return false;
	if (expr instanceof TrueLiteral) return true;
	return ((Boolean) expr).booleanValue();
}
 
Example #2
Source File: SetGeneratedByVisitor.java    From EasyMPermission with MIT License 4 votes vote down vote up
@Override public boolean visit(TrueLiteral node, BlockScope scope) {
	fixPositions(setGeneratedBy(node, source));
	return super.visit(node, scope);
}
 
Example #3
Source File: BinaryExpressionFragmentBuilder.java    From Eclipse-Postfix-Code-Completion with Eclipse Public License 1.0 4 votes vote down vote up
public boolean visit(TrueLiteral trueLiteral, BlockScope scope) {
	addSmallFragment(trueLiteral);
	return false;
}