system/src/sc/lang/java/BodyTypeDeclaration.java
public boolean needsOwnClass(boolean checkComponents) {
      if (needsOwnClass)
         return true;

      // Only eliminate classes for objects.
      if (getDeclarationType() != DeclarationType.OBJECT)
         return true;

      if (ModelUtil.isCompiledClass(getDerivedTypeDeclaration()))
         return true;

      // Any compiled interfaces - need to generate a class
      if (getCompiledImplements() != null)
         return true;

      //if (bodyNeedsClass())
      //   return true;

      // This includes body needs class - when we call this on a modify type, we need to include the body descriptions of any of the types in the chain.
      if (modifyNeedsClass())
         return true;

      if (needsSync())
         return true;

      // Needs to ignore classes in the annotation layer since they won't be there at runtime
      Object concreteExtends = getConcreteExtendsType();
      // The checkComponents flag is used to avoid a recursive definition from getClassDeclarationFromType used to
      // determine the runtime class.  We only need to check this the first time so this speeds things up a little
      if (checkComponents && isComponentType() && (concreteExtends == null || !ModelUtil.isComponentType(concreteExtends))) {
         return true;
      }
      return false;
   }
/**
    * We need to generate a class for an object definition if it is a top-level class or there is a method or field
    */
We need to generate a class for an object definition if it is a top-level class or there is a method or field
We need to generate a class for an object definition if it is a top - level class or there is a method or field
public boolean needsOwnClass(boolean checkComponents) {
      if (needsOwnClass)
         return true;
      if (getDeclarationType() != DeclarationType.OBJECT)
         return true;
      if (ModelUtil.isCompiledClass(getDerivedTypeDeclaration()))
         return true;
      if (getCompiledImplements() != null)
         return true;
      if (modifyNeedsClass())
         return true;
      if (needsSync())
         return true;
      Object concreteExtends = getConcreteExtendsType();
      if (checkComponents && isComponentType() && (concreteExtends == null || !ModelUtil.isComponentType(concreteExtends))) {
         return true;
      }
      return false;
   }
public boolean needsOwnClass ( boolean checkComponents ) { if ( needsOwnClass ) return true ; if ( getDeclarationType ( ) != DeclarationType . OBJECT ) return true ; if ( ModelUtil . isCompiledClass ( getDerivedTypeDeclaration ( ) ) ) return true ; if ( getCompiledImplements ( ) != null ) return true ; if ( modifyNeedsClass ( ) ) return true ; if ( needsSync ( ) ) return true ; Object concreteExtends = getConcreteExtendsType ( ) ; if ( checkComponents && isComponentType ( ) && ( concreteExtends == null || ! ModelUtil . isComponentType ( concreteExtends ) ) ) { return true ; } return false ; }
We need to generate a class for an object definition if it is a top-level class or there is a method or field
We need to generate a class for an object definition if it is a top - level class or there is a method or field
// Only eliminate classes for objects. // Any compiled interfaces - need to generate a class //if (bodyNeedsClass()) //   return true; // This includes body needs class - when we call this on a modify type, we need to include the body descriptions of any of the types in the chain. // Needs to ignore classes in the annotation layer since they won't be there at runtime // The checkComponents flag is used to avoid a recursive definition from getClassDeclarationFromType used to // determine the runtime class.  We only need to check this the first time so this speeds things up a little