You are viewing a plain text version of this content. The canonical link for it is here.
Posted to commits@weex.apache.org by bo...@apache.org on 2017/04/18 09:51:16 UTC
[7/8] incubator-weex git commit: Revert "* [ios] add config for
componentWithName"
Revert "* [ios] add config for componentWithName"
This reverts commit b2d38557969853b34e4b803ea2aba7a02500d4b3.
Project: http://git-wip-us.apache.org/repos/asf/incubator-weex/repo
Commit: http://git-wip-us.apache.org/repos/asf/incubator-weex/commit/aaa189f8
Tree: http://git-wip-us.apache.org/repos/asf/incubator-weex/tree/aaa189f8
Diff: http://git-wip-us.apache.org/repos/asf/incubator-weex/diff/aaa189f8
Branch: refs/heads/0.12-dev
Commit: aaa189f8181d27afd993fa39c53362f7d954ed77
Parents: f446000
Author: acton393 <zh...@gmail.com>
Authored: Tue Apr 18 17:43:53 2017 +0800
Committer: acton393 <zh...@gmail.com>
Committed: Tue Apr 18 17:43:53 2017 +0800
----------------------------------------------------------------------
.../Sources/Handler/WXConfigDefaultImpl.h | 26 ----------
.../Sources/Handler/WXConfigDefaultImpl.m | 54 --------------------
.../Sources/Manager/WXComponentFactory.m | 7 ---
.../WeexSDK/Sources/Protocol/WXConfigProtocol.h | 27 ----------
4 files changed, 114 deletions(-)
----------------------------------------------------------------------
http://git-wip-us.apache.org/repos/asf/incubator-weex/blob/aaa189f8/ios/sdk/WeexSDK/Sources/Handler/WXConfigDefaultImpl.h
----------------------------------------------------------------------
diff --git a/ios/sdk/WeexSDK/Sources/Handler/WXConfigDefaultImpl.h b/ios/sdk/WeexSDK/Sources/Handler/WXConfigDefaultImpl.h
deleted file mode 100644
index ccd7280..0000000
--- a/ios/sdk/WeexSDK/Sources/Handler/WXConfigDefaultImpl.h
+++ /dev/null
@@ -1,26 +0,0 @@
-/*
- * Licensed to the Apache Software Foundation (ASF) under one
- * or more contributor license agreements. See the NOTICE file
- * distributed with this work for additional information
- * regarding copyright ownership. The ASF licenses this file
- * to you under the Apache License, Version 2.0 (the
- * "License"); you may not use this file except in compliance
- * with the License. You may obtain a copy of the License at
- *
- * http://www.apache.org/licenses/LICENSE-2.0
- *
- * Unless required by applicable law or agreed to in writing,
- * software distributed under the License is distributed on an
- * "AS IS" BASIS, WITHOUT WARRANTIES OR CONDITIONS OF ANY
- * KIND, either express or implied. See the License for the
- * specific language governing permissions and limitations
- * under the License.
- */
-
-#import <Foundation/Foundation.h>
-
-#import "WXConfigProtocol.h"
-
-@interface WXConfigDefaultImpl : NSObject<WXConfigProtocol>
-
-@end
http://git-wip-us.apache.org/repos/asf/incubator-weex/blob/aaa189f8/ios/sdk/WeexSDK/Sources/Handler/WXConfigDefaultImpl.m
----------------------------------------------------------------------
diff --git a/ios/sdk/WeexSDK/Sources/Handler/WXConfigDefaultImpl.m b/ios/sdk/WeexSDK/Sources/Handler/WXConfigDefaultImpl.m
deleted file mode 100644
index 1d2ebf5..0000000
--- a/ios/sdk/WeexSDK/Sources/Handler/WXConfigDefaultImpl.m
+++ /dev/null
@@ -1,54 +0,0 @@
-/*
- * Licensed to the Apache Software Foundation (ASF) under one
- * or more contributor license agreements. See the NOTICE file
- * distributed with this work for additional information
- * regarding copyright ownership. The ASF licenses this file
- * to you under the Apache License, Version 2.0 (the
- * "License"); you may not use this file except in compliance
- * with the License. You may obtain a copy of the License at
- *
- * http://www.apache.org/licenses/LICENSE-2.0
- *
- * Unless required by applicable law or agreed to in writing,
- * software distributed under the License is distributed on an
- * "AS IS" BASIS, WITHOUT WARRANTIES OR CONDITIONS OF ANY
- * KIND, either express or implied. See the License for the
- * specific language governing permissions and limitations
- * under the License.
- */
-
-#import "WXConfigDefaultImpl.h"
-#import "WXThreadSafeMutableDictionary.h"
-#import "WXUtility.h"
-
-@interface WXConfigDefaultImpl()
-@property(nonatomic, strong) WXThreadSafeMutableDictionary* configDic;
-@end
-@implementation WXConfigDefaultImpl
-
-- (instancetype)init
-{
- if (self = [super init]) {
- _configDic = [WXThreadSafeMutableDictionary new];
- }
-
- return self;
-}
-
-- (void)setClassWithName:(Class)className name:(NSString *)name
-{
- if (![WXUtility isBlankString:name] && className) {
- [_configDic setObject:className forKey:name];
- }
-}
-
-- (Class)classWithName:(NSString *)name
-{
- if (![WXUtility isBlankString:name]) {
- return [_configDic objectForKey:name];
- }
-
- return nil;
-}
-
-@end
http://git-wip-us.apache.org/repos/asf/incubator-weex/blob/aaa189f8/ios/sdk/WeexSDK/Sources/Manager/WXComponentFactory.m
----------------------------------------------------------------------
diff --git a/ios/sdk/WeexSDK/Sources/Manager/WXComponentFactory.m b/ios/sdk/WeexSDK/Sources/Manager/WXComponentFactory.m
index 7589dfe..aa79bad 100644
--- a/ios/sdk/WeexSDK/Sources/Manager/WXComponentFactory.m
+++ b/ios/sdk/WeexSDK/Sources/Manager/WXComponentFactory.m
@@ -21,8 +21,6 @@
#import "WXAssert.h"
#import "WXLog.h"
#import "WXInvocationConfig.h"
-#import "WXHandlerFactory.h"
-#import "WXConfigProtocol.h"
#import <objc/runtime.h>
@@ -191,11 +189,6 @@
if(!config || !config.clazz) {
return nil;
}
- id<WXConfigProtocol> configHandler = [WXHandlerFactory handlerForProtocol:NSProtocolFromString(@"WXConfigProtocol")];
-
- if ([configHandler respondsToSelector:@selector(classWithName:)]) {
- return [configHandler classWithName:name];
- }
return NSClassFromString(config.clazz);
}
http://git-wip-us.apache.org/repos/asf/incubator-weex/blob/aaa189f8/ios/sdk/WeexSDK/Sources/Protocol/WXConfigProtocol.h
----------------------------------------------------------------------
diff --git a/ios/sdk/WeexSDK/Sources/Protocol/WXConfigProtocol.h b/ios/sdk/WeexSDK/Sources/Protocol/WXConfigProtocol.h
deleted file mode 100644
index a4a9e93..0000000
--- a/ios/sdk/WeexSDK/Sources/Protocol/WXConfigProtocol.h
+++ /dev/null
@@ -1,27 +0,0 @@
-/*
- * Licensed to the Apache Software Foundation (ASF) under one
- * or more contributor license agreements. See the NOTICE file
- * distributed with this work for additional information
- * regarding copyright ownership. The ASF licenses this file
- * to you under the Apache License, Version 2.0 (the
- * "License"); you may not use this file except in compliance
- * with the License. You may obtain a copy of the License at
- *
- * http://www.apache.org/licenses/LICENSE-2.0
- *
- * Unless required by applicable law or agreed to in writing,
- * software distributed under the License is distributed on an
- * "AS IS" BASIS, WITHOUT WARRANTIES OR CONDITIONS OF ANY
- * KIND, either express or implied. See the License for the
- * specific language governing permissions and limitations
- * under the License.
- */
-
-@protocol WXConfigProtocol <NSObject>
-
-@optional
-
-- (Class)classWithName:(NSString*)name;
-- (void)setClassWithName:(Class)className name:(NSString*)name;
-
-@end