本文整理汇总了Java中com.siyeh.ig.psiutils.VariableAccessUtils.variableIsUsedInArrayInitializer方法的典型用法代码示例。如果您正苦于以下问题:Java VariableAccessUtils.variableIsUsedInArrayInitializer方法的具体用法?Java VariableAccessUtils.variableIsUsedInArrayInitializer怎么用?Java VariableAccessUtils.variableIsUsedInArrayInitializer使用的例子?那么, 这里精选的方法代码示例或许可以为您提供帮助。您也可以进一步了解该方法所在类com.siyeh.ig.psiutils.VariableAccessUtils
的用法示例。
在下文中一共展示了VariableAccessUtils.variableIsUsedInArrayInitializer方法的5个代码示例,这些例子默认根据受欢迎程度排序。您可以为喜欢或者感觉有用的代码点赞,您的评价将有助于系统推荐出更棒的Java代码示例。
示例1: checkVariable
import com.siyeh.ig.psiutils.VariableAccessUtils; //导入方法依赖的package包/类
private static boolean checkVariable(PsiVariable variable,
PsiElement context) {
if (context == null) {
return false;
}
final PsiType type = variable.getType();
if (type.getArrayDimensions() == 0) {
return false;
}
if (VariableAccessUtils.variableIsAssigned(variable, context)) {
return false;
}
if (VariableAccessUtils.variableIsAssignedFrom(variable, context)) {
return false;
}
if (VariableAccessUtils.variableIsReturned(variable, context)) {
return false;
}
return !VariableAccessUtils.variableIsUsedInArrayInitializer(variable, context);
}
示例2: checkVariable
import com.siyeh.ig.psiutils.VariableAccessUtils; //导入方法依赖的package包/类
private boolean checkVariable(PsiVariable variable, PsiElement context) {
if (context == null) {
return false;
}
final PsiType type = variable.getType();
if (!CollectionUtils.isCollectionClassOrInterface(type)) {
return false;
}
if (VariableAccessUtils.variableIsAssignedFrom(variable, context)) {
return false;
}
if (VariableAccessUtils.variableIsReturned(variable, context)) {
return false;
}
return !VariableAccessUtils.variableIsUsedInArrayInitializer(variable, context);
}
开发者ID:jskierbi,项目名称:intellij-ce-playground,代码行数:17,代码来源:MismatchedCollectionQueryUpdateInspectionBase.java
示例3: checkVariable
import com.siyeh.ig.psiutils.VariableAccessUtils; //导入方法依赖的package包/类
private static boolean checkVariable(PsiVariable variable, PsiElement context) {
if (context == null) {
return false;
}
if (!TypeUtils.variableHasTypeOrSubtype(variable, CommonClassNames.JAVA_LANG_ABSTRACT_STRING_BUILDER)) {
return false;
}
if (VariableAccessUtils.variableIsAssigned(variable, context)) {
return false;
}
if (VariableAccessUtils.variableIsAssignedFrom(variable, context)) {
return false;
}
if (VariableAccessUtils.variableIsReturned(variable, context)) {
return false;
}
if (VariableAccessUtils.variableIsPassedAsMethodArgument(variable, context)) {
return false;
}
return !VariableAccessUtils.variableIsUsedInArrayInitializer(variable, context);
}
开发者ID:jskierbi,项目名称:intellij-ce-playground,代码行数:22,代码来源:MismatchedStringBuilderQueryUpdateInspection.java
示例4: checkVariable
import com.siyeh.ig.psiutils.VariableAccessUtils; //导入方法依赖的package包/类
private static boolean checkVariable(PsiVariable variable,
PsiElement context) {
if (context == null) {
return false;
}
final PsiType type = variable.getType();
if (type.getArrayDimensions() == 0) {
return false;
}
if (VariableAccessUtils.variableIsAssigned(variable, context)) {
return false;
}
if (VariableAccessUtils.variableIsAssignedFrom(variable, context)) {
return false;
}
if (VariableAccessUtils.variableIsReturned(variable, context)) {
return false;
}
return !VariableAccessUtils.variableIsUsedInArrayInitializer(
variable, context);
}
示例5: checkVariable
import com.siyeh.ig.psiutils.VariableAccessUtils; //导入方法依赖的package包/类
private boolean checkVariable(PsiVariable variable, PsiElement context) {
if (context == null) {
return false;
}
final PsiType type = variable.getType();
if (!CollectionUtils.isCollectionClassOrInterface(type)) {
return false;
}
if (VariableAccessUtils.variableIsAssignedFrom(variable, context)) {
return false;
}
if (VariableAccessUtils.variableIsReturned(variable, context)) {
return false;
}
if (VariableAccessUtils.variableIsPassedAsMethodArgument(variable, context)) {
return false;
}
return !VariableAccessUtils.variableIsUsedInArrayInitializer(variable, context);
}
开发者ID:lshain-android-source,项目名称:tools-idea,代码行数:20,代码来源:MismatchedCollectionQueryUpdateInspectionBase.java