context.pushCallingDescriptor(descriptor);
BaseComponent<?, ?> oldComponent = context.setCurrentComponent(new ProtoComponentImpl(descriptor,
getGlobalId(), attributeSet));
try {
RootDefinition root = intfDescriptor.getDef();
ProviderDef providerDef = root.getLocalProviderDef();
if (providerDef == null) {
providerDef = root.getProviderDef();
if (providerDef != null) {
// In this case, we have a 'remote' provider (i.e. client side) and we simply
// continue on as if nothing happened.
} else {
throw new InvalidDefinitionException(String.format("%s cannot be instantiated directly.",
descriptor), root.getLocation());
}
}
if (providerDef.isLocal()) {
ComponentConfig config = providerDef.provide(intfDescriptor);
if (config != null) {
ProviderDef remoteProviderDef = root.getProviderDef();
if (remoteProviderDef == null || remoteProviderDef.isLocal()) {
hasLocalDependencies = true;
}
DefDescriptor<ComponentDef> d = config.getDescriptor();
if (d != null) {