flink-user mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From 윤형덕 <ynoo...@naver.com>
Subject inheritance of Program interface in Program.java in org.apache.flink.api.common
Date Thu, 19 May 2016 14:46:15 GMT
hello first I'm sorry for my poor english.
I were looking at PackagedProgram.java from org.apache.flink.client.program 
and in following cunstructor: PackagedProgram(File jarFile, List classpaths, String entryPointClassName,
String... args) 
there is some code I couldn't understand. please look blow
this.mainClass = loadMainClass(entryPointClassName, userCodeClassLoader);   

if (Program.class.isAssignableFrom(this.mainClass)) {
   Program prg = null;

   try {
      prg = InstantiationUtil.instantiate(this.mainClass.asSubclass(Program.class), Program.class);
how can this.mainClass that doesn't override getPlan method that is abstract method of Program
interface(program.class) and has only static main method be instantiate as Program?
Thank you for your reading. 

View raw message