system/src/sc/layer/LayeredSystem.java
public Object loadInstanceFromFile(String fileName, String relFileName) {
      File f = new File(fileName);
      if (!f.exists())
         return null;
      SrcEntry srcEnt = new SrcEntry(null, fileName, relFileName);

      Object res = parseSrcFile(srcEnt, false, false, false, true, false, true);
      if (res instanceof JavaModel) {
         JavaModel model = (JavaModel) res;
         ParseUtil.startComponent(model);
         ParseUtil.validateComponent(model);
         if (model.getModelTypeDeclaration() == null) {
            return null;
         }
         return model.getModelTypeDeclaration().createInstance();
      }
      else {
         System.err.println("*** model file did not contain valid java model: " + fileName);
         return null;
      }
   }
/**
    * Creates an object instance from a .sc file that is not part of a layer, i.e. the global dependencies object
    * Parses the file, inits and starts the component, creates an instance with those properties and returns
    * that instance.  This instance is not put into any type index - it is not referenceable by other code
    */
Creates an object instance from a .sc file that is not part of a layer, i.e. the global dependencies object
Parses the file, inits and starts the component, creates an instance with those properties and returns
that instance.  This instance is not put into any type index - it is not referenceable by other code
Creates an object instance from a . sc file that is not part of a layer i . e . the global dependencies object Parses the file inits and starts the component creates an instance with those properties and returns that instance . This instance is not put into any type index - it is not referenceable by other code
public Object loadInstanceFromFile(String fileName, String relFileName) {
      File f = new File(fileName);
      if (!f.exists())
         return null;
      SrcEntry srcEnt = new SrcEntry(null, fileName, relFileName);
      Object res = parseSrcFile(srcEnt, false, false, false, true, false, true);
      if (res instanceof JavaModel) {
         JavaModel model = (JavaModel) res;
         ParseUtil.startComponent(model);
         ParseUtil.validateComponent(model);
         if (model.getModelTypeDeclaration() == null) {
            return null;
         }
         return model.getModelTypeDeclaration().createInstance();
      }
      else {
         System.err.println("*** model file did not contain valid java model: " + fileName);
         return null;
      }
   }
public Object loadInstanceFromFile ( String fileName , String relFileName ) { File f = new File ( fileName ) ; if ( ! f . exists ( ) ) return null ; SrcEntry srcEnt = new SrcEntry ( null , fileName , relFileName ) ; Object res = parseSrcFile ( srcEnt , false , false , false , true , false , true ) ; if ( res instanceof JavaModel ) { JavaModel model = ( JavaModel ) res ; ParseUtil . startComponent ( model ) ; ParseUtil . validateComponent ( model ) ; if ( model . getModelTypeDeclaration ( ) == null ) { return null ; } return model . getModelTypeDeclaration ( ) . createInstance ( ) ; } else { System . err . println ( "*** model file did not contain valid java model: " + fileName ) ; return null ; } }
Creates an object instance from a .sc file that is not part of a layer, i.e.
Creates an object instance from a . sc file that is not part of a layer i . e .