org.objectweb.asm.Type.appendDescriptor()方法的使用及代码示例

x33g5p2x  于2022-01-29 转载在 其他  
字(9.0k)|赞(0)|评价(0)|浏览(82)

本文整理了Java中org.objectweb.asm.Type.appendDescriptor()方法的一些代码示例,展示了Type.appendDescriptor()的具体用法。这些代码示例主要来源于Github/Stackoverflow/Maven等平台,是从一些精选项目中提取出来的代码,具有较强的参考意义,能在一定程度帮忙到你。Type.appendDescriptor()方法的具体详情如下:
包路径:org.objectweb.asm.Type
类名称:Type
方法名:appendDescriptor

Type.appendDescriptor介绍

[英]Appends the descriptor of the given class to the given string builder.
[中]将给定类的描述符附加到给定的字符串生成器。

代码示例

代码示例来源:origin: org.ow2.asm/asm

/**
 * Returns the descriptor corresponding to the given class.
 *
 * @param clazz an object class, a primitive class or an array class.
 * @return the descriptor corresponding to the given class.
 */
public static String getDescriptor(final Class<?> clazz) {
 StringBuilder stringBuilder = new StringBuilder();
 appendDescriptor(clazz, stringBuilder);
 return stringBuilder.toString();
}

代码示例来源:origin: org.ow2.asm/asm

/**
 * Returns the descriptor corresponding to the given argument and return types.
 *
 * @param returnType the return type of the method.
 * @param argumentTypes the argument types of the method.
 * @return the descriptor corresponding to the given argument and return types.
 */
public static String getMethodDescriptor(final Type returnType, final Type... argumentTypes) {
 StringBuilder stringBuilder = new StringBuilder();
 stringBuilder.append('(');
 for (Type argumentType : argumentTypes) {
  argumentType.appendDescriptor(stringBuilder);
 }
 stringBuilder.append(')');
 returnType.appendDescriptor(stringBuilder);
 return stringBuilder.toString();
}

代码示例来源:origin: org.ow2.asm/asm

/**
 * Returns the descriptor corresponding to the given constructor.
 *
 * @param constructor a {@link Constructor} object.
 * @return the descriptor of the given constructor.
 */
public static String getConstructorDescriptor(final Constructor<?> constructor) {
 StringBuilder stringBuilder = new StringBuilder();
 stringBuilder.append('(');
 Class<?>[] parameters = constructor.getParameterTypes();
 for (Class<?> parameter : parameters) {
  appendDescriptor(parameter, stringBuilder);
 }
 return stringBuilder.append(")V").toString();
}

代码示例来源:origin: org.ow2.asm/asm

/**
 * Returns the descriptor corresponding to the given method.
 *
 * @param method a {@link Method} object.
 * @return the descriptor of the given method.
 */
public static String getMethodDescriptor(final Method method) {
 StringBuilder stringBuilder = new StringBuilder();
 stringBuilder.append('(');
 Class<?>[] parameters = method.getParameterTypes();
 for (Class<?> parameter : parameters) {
  appendDescriptor(parameter, stringBuilder);
 }
 stringBuilder.append(')');
 appendDescriptor(method.getReturnType(), stringBuilder);
 return stringBuilder.toString();
}

代码示例来源:origin: com.bladejava/blade-asm

/**
 * Returns the descriptor corresponding to the given class.
 *
 * @param clazz an object class, a primitive class or an array class.
 * @return the descriptor corresponding to the given class.
 */
public static String getDescriptor(final Class<?> clazz) {
 StringBuilder stringBuilder = new StringBuilder();
 appendDescriptor(stringBuilder, clazz);
 return stringBuilder.toString();
}

代码示例来源:origin: org.apache.aries.spifly/org.apache.aries.spifly.dynamic.bundle

/**
 * Returns the descriptor corresponding to the given class.
 *
 * @param clazz an object class, a primitive class or an array class.
 * @return the descriptor corresponding to the given class.
 */
public static String getDescriptor(final Class<?> clazz) {
 StringBuilder stringBuilder = new StringBuilder();
 appendDescriptor(clazz, stringBuilder);
 return stringBuilder.toString();
}

代码示例来源:origin: org.apache.aries.spifly/org.apache.aries.spifly.dynamic.framework.extension

/**
 * Returns the descriptor corresponding to the given class.
 *
 * @param clazz an object class, a primitive class or an array class.
 * @return the descriptor corresponding to the given class.
 */
public static String getDescriptor(final Class<?> clazz) {
 StringBuilder stringBuilder = new StringBuilder();
 appendDescriptor(clazz, stringBuilder);
 return stringBuilder.toString();
}

代码示例来源:origin: org.apache.aries.spifly/org.apache.aries.spifly.dynamic.bundle

/**
 * Returns the descriptor corresponding to the given argument and return types.
 *
 * @param returnType the return type of the method.
 * @param argumentTypes the argument types of the method.
 * @return the descriptor corresponding to the given argument and return types.
 */
public static String getMethodDescriptor(final Type returnType, final Type... argumentTypes) {
 StringBuilder stringBuilder = new StringBuilder();
 stringBuilder.append('(');
 for (Type argumentType : argumentTypes) {
  argumentType.appendDescriptor(stringBuilder);
 }
 stringBuilder.append(')');
 returnType.appendDescriptor(stringBuilder);
 return stringBuilder.toString();
}

代码示例来源:origin: com.bladejava/blade-asm

/**
 * Returns the descriptor corresponding to the given argument and return types.
 *
 * @param returnType the return type of the method.
 * @param argumentTypes the argument types of the method.
 * @return the descriptor corresponding to the given argument and return types.
 */
public static String getMethodDescriptor(final Type returnType, final Type... argumentTypes) {
 StringBuilder stringBuilder = new StringBuilder();
 stringBuilder.append('(');
 for (int i = 0; i < argumentTypes.length; ++i) {
  argumentTypes[i].appendDescriptor(stringBuilder);
 }
 stringBuilder.append(')');
 returnType.appendDescriptor(stringBuilder);
 return stringBuilder.toString();
}

代码示例来源:origin: org.apache.aries.spifly/org.apache.aries.spifly.dynamic.framework.extension

/**
 * Returns the descriptor corresponding to the given argument and return types.
 *
 * @param returnType the return type of the method.
 * @param argumentTypes the argument types of the method.
 * @return the descriptor corresponding to the given argument and return types.
 */
public static String getMethodDescriptor(final Type returnType, final Type... argumentTypes) {
 StringBuilder stringBuilder = new StringBuilder();
 stringBuilder.append('(');
 for (Type argumentType : argumentTypes) {
  argumentType.appendDescriptor(stringBuilder);
 }
 stringBuilder.append(')');
 returnType.appendDescriptor(stringBuilder);
 return stringBuilder.toString();
}

代码示例来源:origin: com.bladejava/blade-asm

/**
 * Returns the descriptor corresponding to the given method.
 *
 * @param method a {@link Method} object.
 * @return the descriptor of the given method.
 */
public static String getMethodDescriptor(final Method method) {
 StringBuilder stringBuilder = new StringBuilder();
 stringBuilder.append('(');
 Class<?>[] parameters = method.getParameterTypes();
 for (int i = 0; i < parameters.length; ++i) {
  appendDescriptor(stringBuilder, parameters[i]);
 }
 stringBuilder.append(')');
 appendDescriptor(stringBuilder, method.getReturnType());
 return stringBuilder.toString();
}

代码示例来源:origin: org.apache.aries.spifly/org.apache.aries.spifly.dynamic.bundle

/**
 * Returns the descriptor corresponding to the given method.
 *
 * @param method a {@link Method} object.
 * @return the descriptor of the given method.
 */
public static String getMethodDescriptor(final Method method) {
 StringBuilder stringBuilder = new StringBuilder();
 stringBuilder.append('(');
 Class<?>[] parameters = method.getParameterTypes();
 for (Class<?> parameter : parameters) {
  appendDescriptor(parameter, stringBuilder);
 }
 stringBuilder.append(')');
 appendDescriptor(method.getReturnType(), stringBuilder);
 return stringBuilder.toString();
}

代码示例来源:origin: org.apache.aries.spifly/org.apache.aries.spifly.dynamic.framework.extension

/**
 * Returns the descriptor corresponding to the given method.
 *
 * @param method a {@link Method} object.
 * @return the descriptor of the given method.
 */
public static String getMethodDescriptor(final Method method) {
 StringBuilder stringBuilder = new StringBuilder();
 stringBuilder.append('(');
 Class<?>[] parameters = method.getParameterTypes();
 for (Class<?> parameter : parameters) {
  appendDescriptor(parameter, stringBuilder);
 }
 stringBuilder.append(')');
 appendDescriptor(method.getReturnType(), stringBuilder);
 return stringBuilder.toString();
}

代码示例来源:origin: org.apache.aries.spifly/org.apache.aries.spifly.dynamic.bundle

/**
 * Returns the descriptor corresponding to the given constructor.
 *
 * @param constructor a {@link Constructor} object.
 * @return the descriptor of the given constructor.
 */
public static String getConstructorDescriptor(final Constructor<?> constructor) {
 StringBuilder stringBuilder = new StringBuilder();
 stringBuilder.append('(');
 Class<?>[] parameters = constructor.getParameterTypes();
 for (Class<?> parameter : parameters) {
  appendDescriptor(parameter, stringBuilder);
 }
 return stringBuilder.append(")V").toString();
}

代码示例来源:origin: com.bladejava/blade-asm

/**
 * Returns the descriptor corresponding to the given constructor.
 *
 * @param constructor a {@link Constructor} object.
 * @return the descriptor of the given constructor.
 */
public static String getConstructorDescriptor(final Constructor<?> constructor) {
 StringBuilder stringBuilder = new StringBuilder();
 stringBuilder.append('(');
 Class<?>[] parameters = constructor.getParameterTypes();
 for (int i = 0; i < parameters.length; ++i) {
  appendDescriptor(stringBuilder, parameters[i]);
 }
 return stringBuilder.append(")V").toString();
}

代码示例来源:origin: org.apache.aries.spifly/org.apache.aries.spifly.dynamic.framework.extension

/**
 * Returns the descriptor corresponding to the given constructor.
 *
 * @param constructor a {@link Constructor} object.
 * @return the descriptor of the given constructor.
 */
public static String getConstructorDescriptor(final Constructor<?> constructor) {
 StringBuilder stringBuilder = new StringBuilder();
 stringBuilder.append('(');
 Class<?>[] parameters = constructor.getParameterTypes();
 for (Class<?> parameter : parameters) {
  appendDescriptor(parameter, stringBuilder);
 }
 return stringBuilder.append(")V").toString();
}

相关文章