@Override public String toString() { return StringUtil.simpleClassName(this) + "(default: " + defaultValue + ", map: " + map + ')'; } }
/** * This should not be used directly by users of {@link ResourceLeakDetector}. * Please use {@link ResourceLeakDetectorFactory#newResourceLeakDetector(Class)} * or {@link ResourceLeakDetectorFactory#newResourceLeakDetector(Class, int, long)} */ @SuppressWarnings("deprecation") public ResourceLeakDetector(Class<?> resourceType, int samplingInterval) { this(simpleClassName(resourceType), samplingInterval, Long.MAX_VALUE); }
@Override public String toString() { if (sender != null) { return StringUtil.simpleClassName(this) + '(' + sender + " => " + recipient + ", " + message + ')'; } else { return StringUtil.simpleClassName(this) + "(=> " + recipient + ", " + message + ')'; } } }
@Override public String toString() { return StringUtil.simpleClassName(ReflectiveChannelFactory.class) + '(' + StringUtil.simpleClassName(constructor.getDeclaringClass()) + ".class)"; } }
private EmptyByteBuf(ByteBufAllocator alloc, ByteOrder order) { if (alloc == null) { throw new NullPointerException("alloc"); } this.alloc = alloc; this.order = order; str = StringUtil.simpleClassName(this) + (order == ByteOrder.BIG_ENDIAN? "BE" : "LE"); }
@Override protected final Object filterOutboundMessage(Object msg) throws Exception { if (msg instanceof ByteBuf || msg instanceof FileRegion) { return msg; } throw new UnsupportedOperationException( "unsupported message type: " + StringUtil.simpleClassName(msg) + EXPECTED_TYPES); }
/** * The shortcut to {@link #simpleClassName(Class) simpleClassName(o.getClass())}. */ public static String simpleClassName(Object o) { if (o == null) { return "null_object"; } else { return simpleClassName(o.getClass()); } }
/** * @deprecated use {@link ResourceLeakDetectorFactory#newResourceLeakDetector(Class, int, long)}. */ @Deprecated public ResourceLeakDetector(Class<?> resourceType) { this(simpleClassName(resourceType)); }
@Override public String toString() { StringBuilder buf = new StringBuilder() .append(StringUtil.simpleClassName(this)) .append('(').append(config()).append(')'); return buf.toString(); }
@Override public String toString() { return StringUtil.simpleClassName(this) + '(' + name() + ')'; } }
@Override public String toString() { return StringUtil.simpleClassName(obj) + ".release(" + decrement + ") refCnt: " + obj.refCnt(); } }
public ReflectiveChannelFactory(Class<? extends T> clazz) { ObjectUtil.checkNotNull(clazz, "clazz"); try { this.constructor = clazz.getConstructor(); } catch (NoSuchMethodException e) { throw new IllegalArgumentException("Class " + StringUtil.simpleClassName(clazz) + " does not have a public non-arg constructor", e); } }
@Override public String toString() { return StringUtil.simpleClassName(this) + '(' + contentToString() + ')'; }
@Override public String toString() { return StringUtil.simpleClassName(ChannelHandlerContext.class) + '(' + name + ", " + channel() + ')'; }
ReadOnlyByteBufferBuf(ByteBufAllocator allocator, ByteBuffer buffer) { super(buffer.remaining()); if (!buffer.isReadOnly()) { throw new IllegalArgumentException("must be a readonly buffer: " + StringUtil.simpleClassName(buffer)); } this.allocator = allocator; this.buffer = buffer.slice().order(ByteOrder.BIG_ENDIAN); writerIndex(this.buffer.limit()); }
/** * This method is called when an untraced leak is detected. It can be overridden for tracking how many times leaks * have been detected. */ protected void reportUntracedLeak(String resourceType) { logger.error("LEAK: {}.release() was not called before it's garbage-collected. " + "Enable advanced leak reporting to find out where the leak occurred. " + "To enable advanced leak reporting, " + "specify the JVM option '-D{}={}' or call {}.setLevel() " + "See http://netty.io/wiki/reference-counted-objects.html for more information.", resourceType, PROP_LEVEL, Level.ADVANCED.name().toLowerCase(), simpleClassName(this)); }
@Override public String toString() { return StringUtil.simpleClassName(this) + "(usedHeapMemory: " + usedHeapMemory() + "; usedDirectMemory: " + usedDirectMemory() + ')'; } }
@Override public String toString() { return StringUtil.simpleClassName(this) + '(' + "ridx=" + readerIndex() + ", " + "widx=" + writerIndex() + ')'; }
private static void reportTooManyInstances() { if (logger.isErrorEnabled()) { String resourceType = simpleClassName(HashedWheelTimer.class); logger.error("You are creating too many " + resourceType + " instances. " + resourceType + " is a shared resource that must be reused across the JVM," + "so that only a few instances are created."); } }
@Override public String toString() { return StringUtil.simpleClassName(this) + "(name: " + name() + ", size: " + size() + ')'; } }