Exemple #1
0
 /**
  * Traces a type on the operand stack or in a local variable.
  *
  * @param type the type to trace
  * @param prefix the prefix to use if <code>isDerived</code> is true otherwise a prefix of spaces
  *     the same length as <code>prefix</code> is used instead
  * @param isDerived specifies if this a type derived by the verifer or is specified by a stack map
  *     entry
  */
 private void traceType(Klass type, String prefix, boolean isDerived) {
   if (Translator.TRACING_ENABLED) {
     if (!isDerived) {
       char[] spaces = new char[prefix.length()];
       Arrays.fill(spaces, ' ');
       Tracer.trace(new String(spaces));
     } else {
       Tracer.trace(prefix);
     }
     String name = (type == null ? "-T-" : type.getInternalName());
     if (isDerived) {
       Tracer.traceln(" " + name);
     } else {
       Tracer.traceln("{" + name + "}");
     }
   }
 }
Exemple #2
0
 /**
  * Like <code>klass</code> must not yet be converted and it must not be a {@link
  * Klass#isSynthetic() synthetic} class.
  *
  * @param klass the instance class for which a class file is requested
  * @return the class file for <code>klass</code>, or null if that ClassFile has not been
  *     translated by this translator.
  */
 ClassFile lookupClassFile(Klass klass) {
   Assert.that(!klass.isSynthetic(), "synthethic class has no classfile");
   ClassFile classFile = (ClassFile) classFiles.get(klass.getInternalName());
   return classFile;
 }