Java Code Examples for com.android.dx.rop.type.Type#internClassName()

The following examples show how to use com.android.dx.rop.type.Type#internClassName() . You can vote up the ones you like or vote down the ones you don't like, and go to the original project or source file by following the links above each example. You may check out the related API usage on the sidebar.
Example 1
Source File: DexFile.java    From Box with Apache License 2.0 5 votes vote down vote up
/**
 * Gets the class definition with the given name, if any.
 *
 * @param name {@code non-null;} the class name to look for
 * @return {@code null-ok;} the class with the given name, or {@code null}
 * if there is no such class
 */
public ClassDefItem getClassOrNull(String name) {
    try {
        Type type = Type.internClassName(name);
        return (ClassDefItem) classDefs.get(new CstType(type));
    } catch (IllegalArgumentException ex) {
        // Translate exception, per contract.
        return null;
    }
}
 
Example 2
Source File: DexFile.java    From Box with Apache License 2.0 5 votes vote down vote up
/**
 * Gets the class definition with the given name, if any.
 *
 * @param name {@code non-null;} the class name to look for
 * @return {@code null-ok;} the class with the given name, or {@code null}
 * if there is no such class
 */
public ClassDefItem getClassOrNull(String name) {
    try {
        Type type = Type.internClassName(name);
        return (ClassDefItem) classDefs.get(new CstType(type));
    } catch (IllegalArgumentException ex) {
        // Translate exception, per contract.
        return null;
    }
}
 
Example 3
Source File: DexFile.java    From J2ME-Loader with Apache License 2.0 5 votes vote down vote up
/**
 * Gets the class definition with the given name, if any.
 *
 * @param name {@code non-null;} the class name to look for
 * @return {@code null-ok;} the class with the given name, or {@code null}
 * if there is no such class
 */
public ClassDefItem getClassOrNull(String name) {
    try {
        Type type = Type.internClassName(name);
        return (ClassDefItem) classDefs.get(new CstType(type));
    } catch (IllegalArgumentException ex) {
        // Translate exception, per contract.
        return null;
    }
}
 
Example 4
Source File: DexFile.java    From buck with Apache License 2.0 5 votes vote down vote up
/**
 * Gets the class definition with the given name, if any.
 *
 * @param name {@code non-null;} the class name to look for
 * @return {@code null-ok;} the class with the given name, or {@code null}
 * if there is no such class
 */
public ClassDefItem getClassOrNull(String name) {
    try {
        Type type = Type.internClassName(name);
        return (ClassDefItem) classDefs.get(new CstType(type));
    } catch (IllegalArgumentException ex) {
        // Translate exception, per contract.
        return null;
    }
}