You may set platform value in the constructor
public function class Code {
//assume Platform is the class type,remember to import it
private var platform:Platform;
public function Code(value:Platform) {
platform = value;
}
}
When you create Code instance
var code:Code = new Code(platform);//platform is the instance