本文整理汇总了Java中com.dd.plist.NSArray.getArray方法的典型用法代码示例。如果您正苦于以下问题:Java NSArray.getArray方法的具体用法?Java NSArray.getArray怎么用?Java NSArray.getArray使用的例子?那么, 这里精选的方法代码示例或许可以为您提供帮助。您也可以进一步了解该方法所在类com.dd.plist.NSArray
的用法示例。
在下文中一共展示了NSArray.getArray方法的5个代码示例,这些例子默认根据受欢迎程度排序。您可以为喜欢或者感觉有用的代码点赞,您的评价将有助于系统推荐出更棒的Java代码示例。
示例1: listApplications
import com.dd.plist.NSArray; //导入方法依赖的package包/类
@Override
public ImmutableSet<IosAppInfo> listApplications() throws IosDeviceException {
String appArrayXml = await(idevice.installer("-l", "-o", "xml"));
NSArray appArray = (NSArray) PlistParser.fromXml(appArrayXml);
ImmutableSet.Builder<IosAppInfo> appInfos = ImmutableSet.builder();
for (NSObject app : appArray.getArray()) {
appInfos.add(IosAppInfo.readFromPlistDictionary((NSDictionary) app));
}
return appInfos.build();
}
示例2: getColorFromOXPArray
import com.dd.plist.NSArray; //导入方法依赖的package包/类
private static long getColorFromOXPArray(NSArray colorArray) {
NSObject[] array = colorArray.getArray();
float r = array.length > 0 ? ((NSNumber) array[0]).floatValue() : 0;
float g = array.length > 1 ? ((NSNumber) array[1]).floatValue() : 0;
float b = array.length > 2 ? ((NSNumber) array[2]).floatValue() : 0;
float a = array.length > 3 ? ((NSNumber) array[3]).floatValue() : 1;
if (r <= 1.0f && g <= 1.0f && b <= 1.0f && a <= 1.0f) {
return AliteColors.convertRgba(r, g, b, a);
}
a = array.length > 3 ? ((NSNumber) array[3]).floatValue() : 255.0f;
return AliteColors.convertRgba(r / 255.0f, g / 255.0f, b / 255.0f, a / 255.0f);
}
示例3: isFileEntryFoundOnPluginsGroup
import com.dd.plist.NSArray; //导入方法依赖的package包/类
private boolean isFileEntryFoundOnPluginsGroup(PBXFile file,
NSDictionary objects) throws PBXProjectException {
NSDictionary group = getGroupByName(objects, "Plugins");
NSArray children = (NSArray) group.objectForKey("children");
boolean groupFound = false;
NSObject[] childs = children.getArray();
for (int i = 0; i < childs.length; i++) {
NSString str = (NSString)childs[i];
if(str.getContent().equals(file.getFileRef())){
groupFound = true;
break;
}
}
return groupFound;
}
示例4: addToBuildPhase
import com.dd.plist.NSArray; //导入方法依赖的package包/类
private void addToBuildPhase(String phaseName, PBXFile pbxfile) throws PBXProjectException {
NSDictionary phase = getPhaseByName(phaseName);
NSArray files = (NSArray) phase.objectForKey("files");
NSObject[] current = files.getArray();
NSObject[] newArray = new NSObject[ current.length +1 ];
System.arraycopy(current, 0, newArray, 0, current.length);
newArray[newArray.length-1] = new NSString(pbxfile.getUuid());
NSArray newNSArray = new NSArray(newArray);
phase.remove("files");
phase.put("files", newNSArray);
}
示例5: addToPbxGroup
import com.dd.plist.NSArray; //导入方法依赖的package包/类
private void addToPbxGroup(String groupName, PBXFile pbxfile) throws PBXProjectException {
NSDictionary group = getGroupByName(groupName);
NSArray children = (NSArray) group.objectForKey("children");
NSObject[] childs = children.getArray();
NSObject[] newChilds = new NSObject[childs.length +1];
System.arraycopy(childs, 0, newChilds, 0, childs.length);
newChilds[newChilds.length-1] = new NSString(pbxfile.getFileRef());
NSArray newArray = new NSArray(newChilds);
group.remove("children");
group.put("children", newArray);
}