mirror of
https://gitflic.ru/project/openide/openide.git
synced 2026-10-06 10:07:41 +07:00
cleanup: bitutil
This commit is contained in:
@@ -1,5 +1,5 @@
|
||||
/*
|
||||
* Copyright 2000-2009 JetBrains s.r.o.
|
||||
* Copyright 2000-2015 JetBrains s.r.o.
|
||||
*
|
||||
* Licensed under the Apache License, Version 2.0 (the "License");
|
||||
* you may not use this file except in compliance with the License.
|
||||
@@ -17,7 +17,6 @@ package com.intellij.codeInspection.reference;
|
||||
|
||||
import com.intellij.openapi.application.ApplicationManager;
|
||||
import com.intellij.openapi.util.Computable;
|
||||
import com.intellij.openapi.util.Key;
|
||||
import com.intellij.psi.*;
|
||||
import com.intellij.psi.util.ClassUtil;
|
||||
import com.intellij.psi.util.PsiFormatUtil;
|
||||
@@ -33,7 +32,7 @@ import org.jetbrains.annotations.Nullable;
|
||||
public class RefFieldImpl extends RefJavaElementImpl implements RefField {
|
||||
private static final int USED_FOR_READING_MASK = 0x10000;
|
||||
private static final int USED_FOR_WRITING_MASK = 0x20000;
|
||||
private static final int ASSIGNED_ONLY_IN_INITIALIZER = 0x40000;
|
||||
private static final int ASSIGNED_ONLY_IN_INITIALIZER_MASK = 0x40000;
|
||||
|
||||
RefFieldImpl(@NotNull RefClass ownerClass, PsiField field, RefManager manager) {
|
||||
super(field, manager);
|
||||
@@ -94,13 +93,13 @@ public class RefFieldImpl extends RefJavaElementImpl implements RefField {
|
||||
}
|
||||
|
||||
private void setUsedForWriting(boolean usedForWriting) {
|
||||
setFlag(false, ASSIGNED_ONLY_IN_INITIALIZER);
|
||||
setFlag(false, ASSIGNED_ONLY_IN_INITIALIZER_MASK);
|
||||
setFlag(usedForWriting, USED_FOR_WRITING_MASK);
|
||||
}
|
||||
|
||||
@Override
|
||||
public boolean isOnlyAssignedInInitializer() {
|
||||
return checkFlag(ASSIGNED_ONLY_IN_INITIALIZER);
|
||||
return checkFlag(ASSIGNED_ONLY_IN_INITIALIZER_MASK);
|
||||
}
|
||||
|
||||
@Override
|
||||
@@ -130,7 +129,7 @@ public class RefFieldImpl extends RefJavaElementImpl implements RefField {
|
||||
|
||||
if (psiField.getInitializer() != null || psiField instanceof PsiEnumConstant) {
|
||||
if (!checkFlag(USED_FOR_WRITING_MASK)) {
|
||||
setFlag(true, ASSIGNED_ONLY_IN_INITIALIZER);
|
||||
setFlag(true, ASSIGNED_ONLY_IN_INITIALIZER_MASK);
|
||||
setFlag(true, USED_FOR_WRITING_MASK);
|
||||
}
|
||||
}
|
||||
|
||||
+5
-4
@@ -1,5 +1,5 @@
|
||||
/*
|
||||
* Copyright 2000-2014 JetBrains s.r.o.
|
||||
* Copyright 2000-2015 JetBrains s.r.o.
|
||||
*
|
||||
* Licensed under the Apache License, Version 2.0 (the "License");
|
||||
* you may not use this file except in compliance with the License.
|
||||
@@ -41,10 +41,11 @@ public abstract class RefJavaElementImpl extends RefElementImpl implements RefJa
|
||||
private static final int ACCESS_PROTECTED = 0x01;
|
||||
private static final int ACCESS_PACKAGE = 0x02;
|
||||
private static final int ACCESS_PUBLIC = 0x03;
|
||||
|
||||
private static final int IS_STATIC_MASK = 0x04;
|
||||
private static final int IS_FINAL_MASK = 0x08;
|
||||
private static final int IS_USES_DEPRECATION_MASK = 0x200;
|
||||
private static final int IS_SYNTHETIC_JSP_ELEMENT = 0x400;
|
||||
private static final int IS_SYNTHETIC_JSP_ELEMENT_MASK = 0x400;
|
||||
|
||||
protected RefJavaElementImpl(String name, @NotNull RefJavaElement owner) {
|
||||
super(name, owner);
|
||||
@@ -148,11 +149,11 @@ public abstract class RefJavaElementImpl extends RefElementImpl implements RefJa
|
||||
|
||||
@Override
|
||||
public boolean isSyntheticJSP() {
|
||||
return checkFlag(IS_SYNTHETIC_JSP_ELEMENT);
|
||||
return checkFlag(IS_SYNTHETIC_JSP_ELEMENT_MASK);
|
||||
}
|
||||
|
||||
public void setSyntheticJSP(boolean b) {
|
||||
setFlag(b, IS_SYNTHETIC_JSP_ELEMENT);
|
||||
setFlag(b, IS_SYNTHETIC_JSP_ELEMENT_MASK);
|
||||
}
|
||||
|
||||
@Override
|
||||
|
||||
+4
-4
@@ -1,5 +1,5 @@
|
||||
/*
|
||||
* Copyright 2000-2014 JetBrains s.r.o.
|
||||
* Copyright 2000-2015 JetBrains s.r.o.
|
||||
*
|
||||
* Licensed under the Apache License, Version 2.0 (the "License");
|
||||
* you may not use this file except in compliance with the License.
|
||||
@@ -46,7 +46,7 @@ public class RefMethodImpl extends RefJavaElementImpl implements RefMethod {
|
||||
private static final int IS_RETURN_VALUE_USED_MASK = 0x400000;
|
||||
|
||||
private static final int IS_TEST_METHOD_MASK = 0x4000000;
|
||||
private static final int IS_CALLED_ON_SUBCLASS = 0x8000000;
|
||||
private static final int IS_CALLED_ON_SUBCLASS_MASK = 0x8000000;
|
||||
|
||||
private static final String RETURN_VALUE_UNDEFINED = "#";
|
||||
|
||||
@@ -701,11 +701,11 @@ public class RefMethodImpl extends RefJavaElementImpl implements RefMethod {
|
||||
|
||||
@Override
|
||||
public boolean isCalledOnSubClass() {
|
||||
return checkFlag(IS_CALLED_ON_SUBCLASS);
|
||||
return checkFlag(IS_CALLED_ON_SUBCLASS_MASK);
|
||||
}
|
||||
|
||||
public void setCalledOnSubClass(boolean isCalledOnSubClass){
|
||||
setFlag(isCalledOnSubClass, IS_CALLED_ON_SUBCLASS);
|
||||
setFlag(isCalledOnSubClass, IS_CALLED_ON_SUBCLASS_MASK);
|
||||
}
|
||||
|
||||
}
|
||||
|
||||
Reference in New Issue
Block a user