Exemple #1
0
 @Override
 public void merge(TypeData t) {
   try {
     if (!t.isNullType()) {
       array.merge(ArrayType.make(t));
     }
   } catch (org.hotswap.agent.javassist.bytecode.BadBytecode e) {
     // never happens
     throw new RuntimeException("fatal: " + e);
   }
 }
Exemple #2
0
  public static void aastore(
      TypeData array, TypeData value, org.hotswap.agent.javassist.ClassPool cp)
      throws org.hotswap.agent.javassist.bytecode.BadBytecode {
    if (array instanceof AbsTypeVar) {
      if (!value.isNullType()) {
        ((AbsTypeVar) array).merge(ArrayType.make(value));
      }
    }

    if (value instanceof AbsTypeVar) {
      if (array instanceof AbsTypeVar) {
        ArrayElement.make(array); // should call value.setType() later.
      } else if (array instanceof ClassName) {
        if (!array.isNullType()) {
          String type = ArrayElement.typeName(array.getName());
          value.setType(type, cp);
        }
      } else {
        throw new org.hotswap.agent.javassist.bytecode.BadBytecode("bad AASTORE: " + array);
      }
    }
  }
Exemple #3
0
 @Override
 public int dfs(ArrayList<TypeVar> order, int index, org.hotswap.agent.javassist.ClassPool cp)
     throws org.hotswap.agent.javassist.NotFoundException {
   return array.dfs(order, index, cp);
 }
Exemple #4
0
 @Override
 protected TypeVar toTypeVar() {
   return array.toTypeVar();
 }
Exemple #5
0
 @Override
 public void setType(String s, org.hotswap.agent.javassist.ClassPool cp)
     throws org.hotswap.agent.javassist.bytecode.BadBytecode {
   array.setType(ArrayType.typeName(s), cp);
 }
Exemple #6
0
 @Override
 public String getName() {
   return typeName(array.getName());
 }
Exemple #7
0
 @Override
 protected TypeVar toTypeVar() {
   return element.toTypeVar();
 }
Exemple #8
0
 @Override
 public String getName() {
   return typeName(element.getName());
 }