Beispiel #1
0
 @Override
 public IType getEnclosingNonBlockType() {
   ICompilableTypeInternal type = getEnclosingType();
   while (type instanceof IBlockClassInternal) {
     type = type.getEnclosingType();
   }
   return type.getEnclosingNonBlockType();
 }
Beispiel #2
0
 public static IBlockClassInternal create(
     ICompilableTypeInternal enclosingClass, BlockExpression block, boolean staticBlock) {
   BlockClass blockClass;
   if (enclosingClass != null) {
     blockClass = new BlockClass(enclosingClass, enclosingClass.getBlockCount(), block);
   } else {
     blockClass = new BlockClass(block);
   }
   if (staticBlock) {
     blockClass.markStatic();
   }
   return (IBlockClassInternal) blockClass.getOrCreateTypeReference();
 }