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 */