public class Sub {
 public function SubMethod() {
  var temp = new Main();
  temp.method();
 }
}

じゃダメなの?