private NameInfo getNameInfoForName ( String name , SymbolType type ) { Map < String , NameInfo > map = type == PROPERTY ? propertyNameInfo : varNameInfo ; if ( map . containsKey ( name ) ) { return map . get ( name ) ; } else { NameInfo nameInfo = new NameInfo ( name ) ; map . put ( name , nameInfo ) ; symbolGraph . createNode ( nameInfo ) ; return nameInfo ; } }
Gets the name info for the property or variable of a given name and creates a new one if necessary .