当前位置: 首页>>代码示例>>Java>>正文


Java Util.immutableMap方法代码示例

本文整理汇总了Java中edu.umd.cs.findbugs.util.Util.immutableMap方法的典型用法代码示例。如果您正苦于以下问题:Java Util.immutableMap方法的具体用法?Java Util.immutableMap怎么用?Java Util.immutableMap使用的例子?那么, 这里精选的方法代码示例或许可以为您提供帮助。您也可以进一步了解该方法所在edu.umd.cs.findbugs.util.Util的用法示例。


在下文中一共展示了Util.immutableMap方法的6个代码示例,这些例子默认根据受欢迎程度排序。您可以为喜欢或者感觉有用的代码点赞,您的评价将有助于系统推荐出更棒的Java代码示例。

示例1: ClassInfo

import edu.umd.cs.findbugs.util.Util; //导入方法依赖的package包/类
/**
 *
 * @param classDescriptor
 *            ClassDescriptor representing the class name
 * @param superclassDescriptor
 *            ClassDescriptor representing the superclass name
 * @param interfaceDescriptorList
 *            ClassDescriptors representing implemented interface names
 * @param codeBaseEntry
 *            codebase entry class was loaded from
 * @param accessFlags
 *            class's access flags
 * @param referencedClassDescriptorList
 *            ClassDescriptors of all classes/interfaces referenced by the
 *            class
 * @param calledClassDescriptors
 *            TODO
 * @param fieldDescriptorList
 *            FieldDescriptors of fields defined in the class
 * @param methodInfoList
 *            MethodDescriptors of methods defined in the class
 * @param usesConcurrency
 *            TODO
 * @param hasStubs
 *            TODO
 */
private ClassInfo(ClassDescriptor classDescriptor, String classSourceSignature, ClassDescriptor superclassDescriptor,
        ClassDescriptor[] interfaceDescriptorList, ICodeBaseEntry codeBaseEntry, int accessFlags, String source,
        int majorVersion, int minorVersion, Collection<ClassDescriptor> referencedClassDescriptorList,
        Set<ClassDescriptor> calledClassDescriptors, Map<ClassDescriptor, AnnotationValue> classAnnotations,
        FieldInfo[] fieldDescriptorList, MethodInfo[] methodInfoList, ClassDescriptor immediateEnclosingClass,
        boolean usesConcurrency, boolean hasStubs) {
    super(classDescriptor, superclassDescriptor, interfaceDescriptorList, codeBaseEntry, accessFlags,
            referencedClassDescriptorList, calledClassDescriptors, majorVersion, minorVersion);
    this.source = source;
    this.classSourceSignature = classSourceSignature;
    if (fieldDescriptorList.length == 0)
        fieldDescriptorList = FieldInfo.EMPTY_ARRAY;
    this.xFields = fieldDescriptorList;
    this.xMethods = methodInfoList;
    this.immediateEnclosingClass = immediateEnclosingClass;
    this.classAnnotations = Util.immutableMap(classAnnotations);
    this.usesConcurrency = usesConcurrency;
    this.hasStubs = hasStubs;
    this.methodsInCallOrder = computeMethodsInCallOrder();
    if (false) {
        System.out.println("Methods in call order for " + classDescriptor);
        for (MethodInfo m : methodsInCallOrder) {
            System.out.println("  " + m);
        }
        System.out.println();
    }
}
 
开发者ID:ytus,项目名称:findbugs-all-the-bugs,代码行数:54,代码来源:ClassInfo.java

示例2: MethodInfo

import edu.umd.cs.findbugs.util.Util; //导入方法依赖的package包/类
MethodInfo(@SlashedClassName String className, String methodName, String methodSignature, String methodSourceSignature,
        int accessFlags, boolean isUnconditionalThrower, boolean isUnsupported, boolean usesConcurrency,
        boolean hasBackBranch, boolean isStub, boolean isIdentity,
        int methodCallCount, @CheckForNull String[] exceptions, @CheckForNull MethodDescriptor accessMethodForMethod,
        @CheckForNull FieldDescriptor accessMethodForField,
        Map<ClassDescriptor, AnnotationValue> methodAnnotations,
        Map<Integer, Map<ClassDescriptor, AnnotationValue>> methodParameterAnnotations, long variableIsSynthetic) {
    super(className, methodName, methodSignature, (accessFlags & Constants.ACC_STATIC) != 0);
    this.accessFlags = accessFlags;
    this.exceptions = exceptions;
    if (exceptions != null)
        for (int i = 0; i < exceptions.length; i++)
            exceptions[i] = DescriptorFactory.canonicalizeString(exceptions[i]);
    this.methodSourceSignature = DescriptorFactory.canonicalizeString(methodSourceSignature);
    this.methodAnnotations = Util.immutableMap(methodAnnotations);
    this.methodParameterAnnotations = Util.immutableMap(methodParameterAnnotations);
    if (isUnconditionalThrower)
        unconditionalThrowers.put(this, null);
    if (isUnsupported)
        unsupportedMethods.put(this, null);
    if (accessMethodForMethod != null)
        MethodInfo.accessMethodForMethod.put(this, accessMethodForMethod);
    if (accessMethodForField!= null)
        MethodInfo.accessMethodForField.put(this, accessMethodForField);
    if (isIdentity) {
        MethodInfo.identifyMethods.put(this, null);
    }

    this.usesConcurrency = usesConcurrency;
    this.hasBackBranch = hasBackBranch;
    this.isStub = isStub;
    this.methodCallCount = methodCallCount;
    this.variableIsSynthetic = variableIsSynthetic;
}
 
开发者ID:ytus,项目名称:findbugs-all-the-bugs,代码行数:35,代码来源:MethodInfo.java

示例3: FieldInfo

import edu.umd.cs.findbugs.util.Util; //导入方法依赖的package包/类
/**
 * @param className
 * @param fieldName
 * @param fieldSignature
 * @param isStatic
 * @param accessFlags
 * @param fieldAnnotations
 * @param isResolved
 */
private FieldInfo(@SlashedClassName String className, String fieldName, String fieldSignature,
        @CheckForNull String fieldSourceSignature, int accessFlags, Map<ClassDescriptor, AnnotationValue> fieldAnnotations,
        boolean isResolved) {
    super(className, fieldName, fieldSignature, (accessFlags & Constants.ACC_STATIC) != 0);
    this.accessFlags = accessFlags | (fieldName.startsWith("this$") ? Constants.ACC_FINAL : 0);
    this.fieldSourceSignature = fieldSourceSignature;
    this.fieldAnnotations = Util.immutableMap(fieldAnnotations);
    this.isResolved = isResolved;
}
 
开发者ID:ytus,项目名称:findbugs-all-the-bugs,代码行数:19,代码来源:FieldInfo.java

示例4: MethodInfo

import edu.umd.cs.findbugs.util.Util; //导入方法依赖的package包/类
MethodInfo(@SlashedClassName String className, String methodName, String methodSignature, String methodSourceSignature,
        int accessFlags, boolean isUnconditionalThrower, boolean isUnsupported, boolean usesConcurrency,
        boolean hasBackBranch, boolean isStub, boolean isIdentity,
        int methodCallCount, @CheckForNull String[] exceptions, @CheckForNull MethodDescriptor accessMethodForMethod,
        @CheckForNull FieldDescriptor accessMethodForField,
        Map<ClassDescriptor, AnnotationValue> methodAnnotations,
        Map<Integer, Map<ClassDescriptor, AnnotationValue>> methodParameterAnnotations, long variableIsSynthetic) {
    super(className, methodName, methodSignature, (accessFlags & Constants.ACC_STATIC) != 0);
    this.accessFlags = accessFlags;
    this.exceptions = exceptions;
    if (exceptions != null)
        for (int i = 0; i < exceptions.length; i++)
            exceptions[i] = DescriptorFactory.canonicalizeString(exceptions[i]);
    this.methodSourceSignature = DescriptorFactory.canonicalizeString(methodSourceSignature);
    this.methodAnnotations = Util.immutableMap(methodAnnotations);
    this.methodParameterAnnotations = Util.immutableMap(methodParameterAnnotations);
    if (isUnconditionalThrower)
        getUnconditionalthrowers().put(this, null);
    if (isUnsupported)
        getUnconditionalthrowers().put(this, null);
    if (accessMethodForMethod != null)
        getAccessmethodformethod().put(this, accessMethodForMethod);
    if (accessMethodForField!= null)
        getAccessmethodforfield().put(this, accessMethodForField);
    if (isIdentity) {
        getIdentitymethods().put(this, null);
    }

    this.usesConcurrency = usesConcurrency;
    this.hasBackBranch = hasBackBranch;
    this.isStub = isStub;
    this.methodCallCount = methodCallCount;
    this.variableIsSynthetic = variableIsSynthetic;
}
 
开发者ID:OpenNTF,项目名称:FindBug-for-Domino-Designer,代码行数:35,代码来源:MethodInfo.java

示例5: FieldInfo

import edu.umd.cs.findbugs.util.Util; //导入方法依赖的package包/类
private FieldInfo(@SlashedClassName String className, String fieldName, String fieldSignature,
        @CheckForNull String fieldSourceSignature, int accessFlags, Map<ClassDescriptor, AnnotationValue> fieldAnnotations,
        boolean isResolved) {
    super(className, fieldName, fieldSignature, (accessFlags & Constants.ACC_STATIC) != 0);
    this.accessFlags = accessFlags | (fieldName.startsWith("this$") ? Constants.ACC_FINAL : 0);
    this.fieldSourceSignature = fieldSourceSignature;
    this.fieldAnnotations = Util.immutableMap(fieldAnnotations);
    this.isResolved = isResolved;
}
 
开发者ID:OpenNTF,项目名称:FindBug-for-Domino-Designer,代码行数:10,代码来源:FieldInfo.java

示例6: addAnnotation

import edu.umd.cs.findbugs.util.Util; //导入方法依赖的package包/类
/**
 * Destructively add an annotation to the object. In general, this is not a
 * great idea, since it could cause the same class to appear to have
 * different annotations at different times. However, this method is
 * necessary for "built-in" annotations that FindBugs adds to system
 * classes. As long as we add such annotations early enough that nobody will
 * notice, we should be ok.
 *
 * @param annotationValue
 *            an AnnotationValue to add to the class
 */
public void addAnnotation(AnnotationValue annotationValue) {
    HashMap<ClassDescriptor, AnnotationValue> updatedMap = new HashMap<ClassDescriptor, AnnotationValue>(classAnnotations);
    updatedMap.put(annotationValue.getAnnotationClass(), annotationValue);
    classAnnotations = Util.immutableMap(updatedMap);
}
 
开发者ID:ytus,项目名称:findbugs-all-the-bugs,代码行数:17,代码来源:ClassInfo.java


注:本文中的edu.umd.cs.findbugs.util.Util.immutableMap方法示例由纯净天空整理自Github/MSDocs等开源代码及文档管理平台,相关代码片段筛选自各路编程大神贡献的开源项目,源码版权归原作者所有,传播和使用请参考对应项目的License;未经允许,请勿转载。