Sounds like you are basically trying to get something along the lines of a stack trace. You can get a string representation of the stack trace from the Error exception class at runtime, but only in debug mode in Flash Player.
http://livedocs.adobe.com/flash/9.0/ActionScriptLangRefV3/Error.html#getStackTrace%28%29
private function createBranch(arg1:Object):void
{
var stacktrace:String = new Error().getStackTrace();
//parse 'stacktrace' and do what you want here.
}
Now this only works in the debug versions of the player, 'getStackTrace()' returns null in the standard versions, so this would not work for any production app.
The only other alternative would be to pass a token in to 'createBranch' to indicate where the call came from (which I assume would also determine what type of 'branch' you're creating?) This would be a better approach to keep you logic more clean as well I think:
private function createBranch(arg1:Object, branchType:String):void
{
switch(branchType){
case "type1":
//create your branch type1 here
break;
case "type2":
//create your branch type2 here
break;
case "type3":
//create your branch type3 here
break;
}
}
Something like that.