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

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

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

Type.<init>介绍

[英]Constructs a reference type.
[中]构造引用类型。

代码示例

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

/**
 * Returns the {@link Type} corresponding to the given method descriptor. Equivalent to <code>
 * Type.getType(methodDescriptor)</code>.
 *
 * @param methodDescriptor a method descriptor.
 * @return the {@link Type} corresponding to the given method descriptor.
 */
public static Type getMethodType(final String methodDescriptor) {
 return new Type(METHOD, methodDescriptor, 0, methodDescriptor.length());
}

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

/**
 * Returns the {@link Type} corresponding to the given internal name.
 *
 * @param internalName an internal name.
 * @return the {@link Type} corresponding to the given internal name.
 */
public static Type getObjectType(final String internalName) {
 return new Type(
   internalName.charAt(0) == '[' ? ARRAY : INTERNAL, internalName, 0, internalName.length());
}

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

return DOUBLE_TYPE;
case '[':
 return new Type(ARRAY, descriptorBuffer, descriptorBegin, descriptorEnd);
case 'L':
 return new Type(OBJECT, descriptorBuffer, descriptorBegin + 1, descriptorEnd - 1);
case '(':
 return new Type(METHOD, descriptorBuffer, descriptorBegin, descriptorEnd);
default:
 throw new IllegalArgumentException();

代码示例来源:origin: stackoverflow.com

var wrap = function(name)
{
  Type.prototype.constructor.call(this, name);
  this.extraField = 1;
};
wrap.prototype = Type.prototype;
Type = wrap;

var t = new Type();
assertEquals(1, t.extraField);

代码示例来源:origin: stackoverflow.com

List<Type> dynamicList = Arrays.asList(new Type[]{new Type(1), new Type(2), new Type("dog")});
for (Type t : dynamicList) {
  System.out.println("T -> " + t.getDynamicValue(t));
}

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

/**
 * Returns the {@link Type} corresponding to the given method descriptor. Equivalent to <code>
 * Type.getType(methodDescriptor)</code>.
 *
 * @param methodDescriptor a method descriptor.
 * @return the {@link Type} corresponding to the given method descriptor.
 */
public static Type getMethodType(final String methodDescriptor) {
 return new Type(METHOD, methodDescriptor, 0, methodDescriptor.length());
}

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

/**
 * Returns the {@link Type} corresponding to the given method descriptor. Equivalent to <code>
 * Type.getType(methodDescriptor)</code>.
 *
 * @param methodDescriptor a method descriptor.
 * @return the {@link Type} corresponding to the given method descriptor.
 */
public static Type getMethodType(final String methodDescriptor) {
 return new Type(METHOD, methodDescriptor, 0, methodDescriptor.length());
}

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

/**
 * Returns the {@link Type} corresponding to the given method descriptor. Equivalent to <code>
 * Type.getType(methodDescriptor)</code>.
 *
 * @param methodDescriptor a method descriptor.
 * @return the {@link Type} corresponding to the given method descriptor.
 */
public static Type getMethodType(final String methodDescriptor) {
 return new Type(METHOD, methodDescriptor, 0, methodDescriptor.length());
}

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

/**
 * Returns the Java type corresponding to the given internal name.
 * 
 * @param internalName
 *            an internal name.
 * @return the Java type corresponding to the given internal name.
 */
public static Type getObjectType(final String internalName) {
  char[] buf = internalName.toCharArray();
  return new Type(buf[0] == '[' ? ARRAY : OBJECT, buf, 0, buf.length);
}

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

/**
 * Returns the Java type corresponding to the given internal name.
 * 
 * @param internalName
 *            an internal name.
 * @return the Java type corresponding to the given internal name.
 */
public static Type getObjectType(final String internalName) {
  char[] buf = internalName.toCharArray();
  return new Type(buf[0] == '[' ? ARRAY : OBJECT, buf, 0, buf.length);
}

代码示例来源:origin: stackoverflow.com

ThreadLocal<Type> t = new ThreadLocal<>() {
  @Override protected Type initialValue() {
    return new Type(Thread.currentThread.getName());
}

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

/**
 * Returns the {@link Type} corresponding to the given internal name.
 *
 * @param internalName an internal name.
 * @return the {@link Type} corresponding to the given internal name.
 */
public static Type getObjectType(final String internalName) {
 return new Type(
   internalName.charAt(0) == '[' ? ARRAY : INTERNAL, internalName, 0, internalName.length());
}

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

/**
 * Returns the {@link Type} corresponding to the given internal name.
 *
 * @param internalName an internal name.
 * @return the {@link Type} corresponding to the given internal name.
 */
public static Type getObjectType(final String internalName) {
 return new Type(
   internalName.charAt(0) == '[' ? ARRAY : INTERNAL, internalName, 0, internalName.length());
}

代码示例来源:origin: stackoverflow.com

isStringInstance(new Type());
isStringInstance(new String());

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

/**
 * Returns the {@link Type} corresponding to the given internal name.
 *
 * @param internalName an internal name.
 * @return the {@link Type} corresponding to the given internal name.
 */
public static Type getObjectType(final String internalName) {
 return new Type(
   internalName.charAt(0) == '[' ? ARRAY : INTERNAL, internalName, 0, internalName.length());
}

代码示例来源:origin: stackoverflow.com

public void consolidate()
{
  int lengthOfSpaces = spaces.length , i, numberOfEmpties = 0;
  Type[] spacesNumberTwo = new Type[lengthOfSpaces ];

  // pass 1: find empties
  for (i = 0; i < lengthOfSpaces ; i++)
  {
    if(spaces[i].getName().equals("no name") == false)
       spacesNumberTwo[i] = new Type(spaces[i].getName(), spaces[i].getInt());
    else
     numberOfEmpties++;
  }
  for (i = lengthOfSpaces - 1; numberOfEmpties > 0 ; numberOfEmpties--, i--)
  {
      spacesNumberTwo[i] = new Type("no name", 0);
  }
  spaces = spacesNumberTwo
}

代码示例来源:origin: stackoverflow.com

//Test case
Type breed = new Type("BullDog");
Food food = new Food("Best Dog food");
int age = 5;
Dog myBullDog = new Dog(brred, food, age);
assertEquals(myBullDog, createDog(breed,food,age)); //should return true

代码示例来源:origin: stackoverflow.com

Type a = new Type(1);
Type b = new Type(2);
a = b;                 // dispatched to Type.operator=( Type )??
a.foo();
a = new Type(3);       // do you want to copy Type(3) into a, or work with a new object?

代码示例来源:origin: stackoverflow.com

public void startElement(String uri, String localName, String qName, Attributes attributes) throws SAXException {
  if ("type".equals(localName)) {
    type = new Type();

代码示例来源:origin: stackoverflow.com

public class DataGenerationTest {

private EntityManager em;

@Before 
public void init(){
  EntityManagerFactory emf = Persistence.createEntityManagerFactory("test");
  em = emf.createEntityManager();
}

@Test
public void shouldAddSomeCatalogs(){
em.getTransaction().begin();

Catalog catalog = new Catalog();
catalog.setProductName("Proguct");
catalog.setGenre(new Genre());
catalog.setType(new Type());
em.persist(catalog);
  em.getTransaction().commit();
  em.close();
}
}

相关文章