From 8ec2ab7602916ce8bbd83bfc7d1fd60f881a05ea Mon Sep 17 00:00:00 2001 From: "JesusFreke@JesusFreke.com" Date: Tue, 17 Aug 2010 13:28:57 +0000 Subject: [PATCH] Add static helper method to TypeListItem git-svn-id: https://smali.googlecode.com/svn/trunk@789 55b6fa8a-2a1e-11de-a435-ffa8d773f76a --- dexlib/src/main/java/org/jf/dexlib/TypeListItem.java | 10 ++++++++++ 1 file changed, 10 insertions(+) diff --git a/dexlib/src/main/java/org/jf/dexlib/TypeListItem.java b/dexlib/src/main/java/org/jf/dexlib/TypeListItem.java index a2f4c1a0..34053bbb 100644 --- a/dexlib/src/main/java/org/jf/dexlib/TypeListItem.java +++ b/dexlib/src/main/java/org/jf/dexlib/TypeListItem.java @@ -224,6 +224,16 @@ public class TypeListItem extends Item { return new ReadOnlyArrayList(typeList); } + /** + * Helper method to allow easier "inline" retrieval of of the list of TypeIdItems + * @param typeListItem the typeListItem to return the types of (can be null) + * @return an array of the TypeIdItems in the specified TypeListItem, or null if the + * TypeListItem is null + */ + public static List getTypes(TypeListItem typeListItem) { + return typeListItem==null?null:typeListItem.getTypes(); + } + /** * calculate and cache the hashcode */