Tabnine Logo
Reflects.simpleClassName
Code IndexAdd Tabnine to your IDE (free)

How to use
simpleClassName
method
in
org.jupiter.common.util.Reflects

Best Java code snippets using org.jupiter.common.util.Reflects.simpleClassName (Showing top 20 results out of 315)

origin: fengjiachun/Jupiter

/**
 * The shortcut to {@link #simpleClassName(Class) simpleClassName(o.getClass())}.
 */
public static String simpleClassName(Object o) {
  return o == null ? "null_object" : simpleClassName(o.getClass());
}
origin: fengjiachun/Jupiter

/**
 * The shortcut to {@link #simpleClassName(Class) simpleClassName(o.getClass())}.
 */
public static String simpleClassName(Object o) {
  return o == null ? "null_object" : simpleClassName(o.getClass());
}
origin: fengjiachun/Jupiter

public FailOverClusterInvoker(Dispatcher dispatcher, int retries) {
  checkArgument(
      dispatcher instanceof DefaultRoundDispatcher,
      Reflects.simpleClassName(dispatcher) + " is unsupported [FailOverClusterInvoker]"
  );
  this.dispatcher = dispatcher;
  if (retries >= 0) {
    this.retries = retries;
  } else {
    this.retries = 2;
  }
}
origin: fengjiachun/Jupiter

public static byte[] toByteArray(Output output) {
  if (output instanceof WriteSession) {
    return ((WriteSession) output).toByteArray();
  }
  throw new IllegalArgumentException("Output [" + Reflects.simpleClassName(output)
      + "] must be a WriteSession's implementation");
}
origin: fengjiachun/Jupiter

public FailOverClusterInvoker(Dispatcher dispatcher, int retries) {
  checkArgument(
      dispatcher instanceof DefaultRoundDispatcher,
      Reflects.simpleClassName(dispatcher) + " is unsupported [FailOverClusterInvoker]"
  );
  this.dispatcher = dispatcher;
  if (retries >= 0) {
    this.retries = retries;
  } else {
    this.retries = 2;
  }
}
origin: fengjiachun/Jupiter

private static void reportTooManyInstances() {
  String resourceType = Reflects.simpleClassName(HashedWheelTimer.class);
  logger.error("You are creating too many {} instances.  {} is a shared resource that must be " +
      "reused across the JVM, so that only a few instances are created.", resourceType, resourceType);
}
origin: fengjiachun/Jupiter

private static void reportTooManyInstances() {
  String resourceType = Reflects.simpleClassName(HashedWheelTimer.class);
  logger.error("You are creating too many {} instances.  {} is a shared resource that must be " +
      "reused across the JVM, so that only a few instances are created.", resourceType, resourceType);
}
origin: fengjiachun/Jupiter

public static byte[] toByteArray(Output output) {
  if (output instanceof WriteSession) {
    return ((WriteSession) output).toByteArray();
  }
  throw new IllegalArgumentException("Output [" + Reflects.simpleClassName(output)
      + "] must be a WriteSession's implementation");
}
origin: fengjiachun/Jupiter

@Override
protected void encode(ChannelHandlerContext ctx, PayloadHolder msg, ByteBuf out) throws Exception {
  if (msg instanceof JRequestPayload) {
    doEncodeRequest((JRequestPayload) msg, out);
  } else if (msg instanceof JResponsePayload) {
    doEncodeResponse((JResponsePayload) msg, out);
  } else {
    throw new IllegalArgumentException(Reflects.simpleClassName(msg));
  }
}
origin: fengjiachun/Jupiter

protected ByteBuf encode(PayloadHolder msg) throws Exception {
  if (msg instanceof JRequestPayload) {
    return doEncodeRequest((JRequestPayload) msg);
  } else if (msg instanceof JResponsePayload) {
    return doEncodeResponse((JResponsePayload) msg);
  } else {
    throw new IllegalArgumentException(Reflects.simpleClassName(msg));
  }
}
origin: fengjiachun/Jupiter

@Override
protected void encode(ChannelHandlerContext ctx, PayloadHolder msg, ByteBuf out) throws Exception {
  if (msg instanceof JRequestPayload) {
    doEncodeRequest((JRequestPayload) msg, out);
  } else if (msg instanceof JResponsePayload) {
    doEncodeResponse((JResponsePayload) msg, out);
  } else {
    throw new IllegalArgumentException(Reflects.simpleClassName(msg));
  }
}
origin: fengjiachun/Jupiter

protected ByteBuf encode(PayloadHolder msg) throws Exception {
  if (msg instanceof JRequestPayload) {
    return doEncodeRequest((JRequestPayload) msg);
  } else if (msg instanceof JResponsePayload) {
    return doEncodeResponse((JResponsePayload) msg);
  } else {
    throw new IllegalArgumentException(Reflects.simpleClassName(msg));
  }
}
origin: fengjiachun/Jupiter

  @Override
  public String toString() {
    final long currentTime = System.nanoTime();
    long remaining = deadline - currentTime + timer.startTime;
    StringBuilder buf = new StringBuilder(192)
        .append(Reflects.simpleClassName(this))
        .append('(')
        .append("deadline: ");
    if (remaining > 0) {
      buf.append(remaining)
          .append(" ns later");
    } else if (remaining < 0) {
      buf.append(-remaining)
          .append(" ns ago");
    } else {
      buf.append("now");
    }
    if (isCancelled()) {
      buf.append(", cancelled");
    }
    return buf.append(", task: ")
        .append(task())
        .append(')')
        .toString();
  }
}
origin: fengjiachun/Jupiter

  @Override
  public String toString() {
    final long currentTime = System.nanoTime();
    long remaining = deadline - currentTime + timer.startTime;
    StringBuilder buf = new StringBuilder(192)
        .append(Reflects.simpleClassName(this))
        .append('(')
        .append("deadline: ");
    if (remaining > 0) {
      buf.append(remaining)
          .append(" ns later");
    } else if (remaining < 0) {
      buf.append(-remaining)
          .append(" ns ago");
    } else {
      buf.append("now");
    }
    if (isCancelled()) {
      buf.append(", cancelled");
    }
    return buf.append(", task: ")
        .append(task())
        .append(')')
        .toString();
  }
}
origin: fengjiachun/Jupiter

@SuppressWarnings("all")
private static void handleBeforeInvoke(ProviderInterceptor[] interceptors,
                    Object provider,
                    String methodName,
                    Object[] args) {
  for (int i = 0; i < interceptors.length; i++) {
    try {
      interceptors[i].beforeInvoke(provider, methodName, args);
    } catch (Throwable t) {
      logger.error("Interceptor[{}#beforeInvoke]: {}.", Reflects.simpleClassName(interceptors[i]), stackTrace(t));
    }
  }
}
origin: fengjiachun/Jupiter

@SuppressWarnings("all")
private static void handleBeforeInvoke(ProviderInterceptor[] interceptors,
                    Object provider,
                    String methodName,
                    Object[] args) {
  for (int i = 0; i < interceptors.length; i++) {
    try {
      interceptors[i].beforeInvoke(provider, methodName, args);
    } catch (Throwable t) {
      logger.error("Interceptor[{}#beforeInvoke]: {}.", Reflects.simpleClassName(interceptors[i]), stackTrace(t));
    }
  }
}
origin: fengjiachun/Jupiter

@SuppressWarnings("all")
private static void handleAfterInvoke(ProviderInterceptor[] interceptors,
                   Object provider,
                   String methodName,
                   Object[] args,
                   Object invokeResult,
                   Throwable failCause) {
  for (int i = interceptors.length - 1; i >= 0; i--) {
    try {
      interceptors[i].afterInvoke(provider, methodName, args, invokeResult, failCause);
    } catch (Throwable t) {
      logger.error("Interceptor[{}#afterInvoke]: {}.", Reflects.simpleClassName(interceptors[i]), stackTrace(t));
    }
  }
}
origin: fengjiachun/Jupiter

@SuppressWarnings("all")
private static void handleAfterInvoke(ProviderInterceptor[] interceptors,
                   Object provider,
                   String methodName,
                   Object[] args,
                   Object invokeResult,
                   Throwable failCause) {
  for (int i = interceptors.length - 1; i >= 0; i--) {
    try {
      interceptors[i].afterInvoke(provider, methodName, args, invokeResult, failCause);
    } catch (Throwable t) {
      logger.error("Interceptor[{}#afterInvoke]: {}.", Reflects.simpleClassName(interceptors[i]), stackTrace(t));
    }
  }
}
origin: org.jupiter-rpc/jupiter-all

/**
 * The shortcut to {@link #simpleClassName(Class) simpleClassName(o.getClass())}.
 */
public static String simpleClassName(Object o) {
  return o == null ? "null_object" : simpleClassName(o.getClass());
}
origin: org.jupiter-rpc/jupiter-common

private static void reportTooManyInstances() {
  String resourceType = Reflects.simpleClassName(HashedWheelTimer.class);
  logger.error("You are creating too many {} instances.  {} is a shared resource that must be " +
      "reused across the JVM, so that only a few instances are created.", resourceType, resourceType);
}
org.jupiter.common.utilReflectssimpleClassName

Javadoc

Generates a simplified name from a Class. Similar to Class#getSimpleName(), but it works fine with anonymous classes.

Popular methods of Reflects

  • compareParameterTypes
    Compares the relative fitness of two sets of parameter types in terms of matching a third set of run
  • fastInvoke
    Invokes the underlying method, fast invoke using ASM.
  • findMatchingParameterTypes
    Find an array of parameter Types that matches the given compatible parameters.
  • findMatchingParameterTypesExt
    Find an array of parameter Types that matches the given compatible parameters.
  • getField
    Returns a Field object that reflects the specified declared field of the Class or interface represen
  • getObjectTransformationCost
    Gets the number of steps required needed to turn the source class into the destination class. This r
  • getPrimitivePromotionCost
    Gets the number of steps required to promote a primitive number to another type.
  • getTotalTransformationCost
    Returns the sum of the object transformation cost for each class in the source argument list.
  • getTypeDefaultValue
  • isAssignable
    Checks if an array of Classes can be assigned to another array of Classes.
  • primitiveToWrapper
    Converts the specified primitive Class object to its corresponding wrapper Class object.
  • setAccessible
    Set the accessible flag for this object to the indicated boolean value. A value of true indicates th
  • primitiveToWrapper,
  • setAccessible,
  • wrapperToPrimitive,
  • getStaticValue

Popular in Java

  • Parsing JSON documents to java classes using gson
  • getOriginalFilename (MultipartFile)
    Return the original filename in the client's filesystem.This may contain path information depending
  • getApplicationContext (Context)
  • findViewById (Activity)
  • PrintWriter (java.io)
    Wraps either an existing OutputStream or an existing Writerand provides convenience methods for prin
  • URI (java.net)
    A Uniform Resource Identifier that identifies an abstract or physical resource, as specified by RFC
  • SQLException (java.sql)
    An exception that indicates a failed JDBC operation. It provides the following information about pro
  • Collection (java.util)
    Collection is the root of the collection hierarchy. It defines operations on data collections and t
  • HashMap (java.util)
    HashMap is an implementation of Map. All optional operations are supported.All elements are permitte
  • Join (org.hibernate.mapping)
  • CodeWhisperer alternatives
Tabnine Logo
  • Products

    Search for Java codeSearch for JavaScript code
  • IDE Plugins

    IntelliJ IDEAWebStormVisual StudioAndroid StudioEclipseVisual Studio CodePyCharmSublime TextPhpStormVimGoLandRubyMineEmacsJupyter NotebookJupyter LabRiderDataGripAppCode
  • Company

    About UsContact UsCareers
  • Resources

    FAQBlogTabnine AcademyTerms of usePrivacy policyJava Code IndexJavascript Code Index
Get Tabnine for your IDE now