experimental annotation for debugger renderers - IDEA-144797

This commit is contained in:
Egor Ushakov
2019-01-21 15:54:29 +03:00
parent bbc15752d9
commit b07780bc51
2 changed files with 25 additions and 1 deletions
@@ -1,10 +1,11 @@
// Copyright 2000-2018 JetBrains s.r.o. Use of this source code is governed by the Apache 2.0 license that can be found in the LICENSE file.
// Copyright 2000-2019 JetBrains s.r.o. Use of this source code is governed by the Apache 2.0 license that can be found in the LICENSE file.
package com.intellij.util.containers;
import com.intellij.util.SmartList;
import gnu.trove.THashMap;
import gnu.trove.TObjectHashingStrategy;
import org.jetbrains.annotations.Debugger;
import org.jetbrains.annotations.NotNull;
import org.jetbrains.annotations.Nullable;
@@ -18,6 +19,7 @@ import java.util.HashMap;
* @see ConcurrentMultiMap
* @author Dmitry Avdeev
*/
@Debugger.Renderer(text = "\"size = \" + size()", hasChildren = "!isEmpty()", childrenArray = "entrySet().toArray()")
public class MultiMap<K, V> implements Serializable {
public static final MultiMap EMPTY = new EmptyMap();
private static final long serialVersionUID = -2632269270151455493L;
@@ -0,0 +1,22 @@
// Copyright 2000-2019 JetBrains s.r.o. Use of this source code is governed by the Apache 2.0 license that can be found in the LICENSE file.
package org.jetbrains.annotations;
import java.lang.annotation.ElementType;
import java.lang.annotation.Target;
/**
* @author egor
*/
@ApiStatus.Experimental
public class Debugger {
/**
* Advise IDEA Debugger how to render the annotated class
*/
@Target(ElementType.TYPE)
public @interface Renderer {
String text() default "";
String childrenArray() default "";
String hasChildren() default "";
}
}