本文整理汇总了Java中org.eclipse.jdt.internal.corext.util.JavaModelUtil.isBoolean方法的典型用法代码示例。如果您正苦于以下问题:Java JavaModelUtil.isBoolean方法的具体用法?Java JavaModelUtil.isBoolean怎么用?Java JavaModelUtil.isBoolean使用的例子?那么, 这里精选的方法代码示例或许可以为您提供帮助。您也可以进一步了解该方法所在类org.eclipse.jdt.internal.corext.util.JavaModelUtil
的用法示例。
在下文中一共展示了JavaModelUtil.isBoolean方法的3个代码示例,这些例子默认根据受欢迎程度排序。您可以为喜欢或者感觉有用的代码点赞,您的评价将有助于系统推荐出更棒的Java代码示例。
示例1: getNewGetterName
import org.eclipse.jdt.internal.corext.util.JavaModelUtil; //导入方法依赖的package包/类
public String getNewGetterName() throws CoreException {
IMethod primaryGetterCandidate= JavaModelUtil.findMethod(GetterSetterUtil.getGetterName(fField, new String[0]), new String[0], false, fField.getDeclaringType());
if (! JavaModelUtil.isBoolean(fField) || (primaryGetterCandidate != null && primaryGetterCandidate.exists()))
return GetterSetterUtil.getGetterName(fField.getJavaProject(), getNewElementName(), fField.getFlags(), JavaModelUtil.isBoolean(fField), null);
//bug 30906 describes why we need to look for other alternatives here
return GetterSetterUtil.getGetterName(fField.getJavaProject(), getNewElementName(), fField.getFlags(), false, null);
}
示例2: getGetter
import org.eclipse.jdt.internal.corext.util.JavaModelUtil; //导入方法依赖的package包/类
public static IMethod getGetter(IField field) throws JavaModelException{
String getterName= getGetterName(field, EMPTY, true);
IMethod primaryCandidate= JavaModelUtil.findMethod(getterName, new String[0], false, field.getDeclaringType());
if (! JavaModelUtil.isBoolean(field) || (primaryCandidate != null && primaryCandidate.exists()))
return primaryCandidate;
//bug 30906 describes why we need to look for other alternatives here (try with get... for booleans)
String secondCandidateName= getGetterName(field, EMPTY, false);
return JavaModelUtil.findMethod(secondCandidateName, new String[0], false, field.getDeclaringType());
}
示例3: getGetter
import org.eclipse.jdt.internal.corext.util.JavaModelUtil; //导入方法依赖的package包/类
public static IMethod getGetter(IField field) throws JavaModelException {
String getterName = getGetterName(field, EMPTY, true);
IMethod primaryCandidate = JavaModelUtil.findMethod(getterName, new String[0], false, field.getDeclaringType());
if (!JavaModelUtil.isBoolean(field) || (primaryCandidate != null && primaryCandidate.exists())) {
return primaryCandidate;
}
//bug 30906 describes why we need to look for other alternatives here (try with get... for booleans)
String secondCandidateName = getGetterName(field, EMPTY, false);
return JavaModelUtil.findMethod(secondCandidateName, new String[0], false, field.getDeclaringType());
}