public static TypeName findOrCreate(String name) throws IllegalArgumentException { ImmutableByteArray b = ImmutableByteArray.make(name); return findOrCreate(b); }
public static TypeName findOrCreate(String name) throws IllegalArgumentException { ImmutableByteArray b = ImmutableByteArray.make(name); return findOrCreate(b); }
public static final TypeName parseForReturnTypeName(String desc) throws IllegalArgumentException { return parseForReturnTypeName(Language.JAVA, ImmutableByteArray.make(desc)); }
public static final TypeName parseForReturnTypeName(Language l, String desc) throws IllegalArgumentException { return parseForReturnTypeName(l, ImmutableByteArray.make(desc)); }
public static final TypeName parseForReturnTypeName(String desc) throws IllegalArgumentException { return parseForReturnTypeName(Language.JAVA, ImmutableByteArray.make(desc)); }
public static final TypeName parseForReturnTypeName(Language l, String desc) throws IllegalArgumentException { return parseForReturnTypeName(l, ImmutableByteArray.make(desc)); }
public static final TypeName[] parseForParameterNames(Language l, String descriptor) throws IllegalArgumentException { return parseForParameterNames(l, ImmutableByteArray.make(descriptor)); }
public static final TypeName[] parseForParameterNames(String descriptor) throws IllegalArgumentException { return parseForParameterNames(Language.JAVA, ImmutableByteArray.make(descriptor)); }
public static final TypeName[] parseForParameterNames(Language l, String descriptor) throws IllegalArgumentException { return parseForParameterNames(l, ImmutableByteArray.make(descriptor)); }
public static final TypeName[] parseForParameterNames(String descriptor) throws IllegalArgumentException { return parseForParameterNames(Language.JAVA, ImmutableByteArray.make(descriptor)); }
public ClassFileModule(File f, Module container) throws InvalidClassFileException { super(f, container); ShrikeClassReaderHandle reader = new ShrikeClassReaderHandle(this); ImmutableByteArray name = ImmutableByteArray.make(reader.get().getName()); className = name.toString(); }
public ClassFileModule(File f, Module container) throws InvalidClassFileException { super(f, container); ShrikeClassReaderHandle reader = new ShrikeClassReaderHandle(this); ImmutableByteArray name = ImmutableByteArray.make(reader.get().getName()); className = name.toString(); }
static TypeName getTypeName(String fieldType) { ImmutableByteArray fieldTypeArray = ImmutableByteArray.make(fieldType); TypeName T = null; if (fieldTypeArray.get(fieldTypeArray.length() - 1) == ';') { T = TypeName.findOrCreate(fieldTypeArray, 0, fieldTypeArray.length() - 1); } else { T = TypeName.findOrCreate(fieldTypeArray); } return T; }
static TypeName getTypeName(String fieldType) { ImmutableByteArray fieldTypeArray = ImmutableByteArray.make(fieldType); TypeName T = null; if (fieldTypeArray.get(fieldTypeArray.length() - 1) == ';') { T = TypeName.findOrCreate(fieldTypeArray, 0, fieldTypeArray.length() - 1); } else { T = TypeName.findOrCreate(fieldTypeArray); } return T; }
/** * initialize the TypeReference field for this instance * * @throws InvalidClassFileException * iff Shrike can't read this class */ private void computeTypeReference() throws InvalidClassFileException { String className = 'L' + reader.get().getName(); ImmutableByteArray name = ImmutableByteArray.make(className); typeReference = TypeReference.findOrCreate(getClassLoader().getReference(), TypeName.findOrCreate(name)); }
/** * initialize the TypeReference field for this instance * * @throws InvalidClassFileException * iff Shrike can't read this class */ private void computeTypeReference() throws InvalidClassFileException { String className = 'L' + reader.get().getName(); ImmutableByteArray name = ImmutableByteArray.make(className); typeReference = TypeReference.findOrCreate(getClassLoader().getReference(), TypeName.findOrCreate(name)); }
@Override public MethodReference getReference() { //Compute the method reference from the MethodIdItem if (methodReference == null) { // Set method name Atom name = Atom.findOrCreateUnicodeAtom(eMethod.getName()); // // Set the descriptor // Descriptor descriptor = Descriptor.findOrCreateUTF8(eMethod.method.getPrototype().getPrototypeString()); // methodReference = MethodReference.findOrCreate(myClass.getReference(),name, descriptor); Descriptor D = Descriptor.findOrCreate(myClass.getClassLoader().getLanguage(), ImmutableByteArray.make(DexUtil.getSignature(eMethod))); methodReference = MethodReference.findOrCreate(myClass.getReference(), name, D); } return methodReference; }
@Override public MethodReference getReference() { //Compute the method reference from the MethodIdItem if (methodReference == null) { // Set method name Atom name = Atom.findOrCreateUnicodeAtom(eMethod.getName()); // // Set the descriptor // Descriptor descriptor = Descriptor.findOrCreateUTF8(eMethod.method.getPrototype().getPrototypeString()); // methodReference = MethodReference.findOrCreate(myClass.getReference(),name, descriptor); Descriptor D = Descriptor.findOrCreate(myClass.getClassLoader().getLanguage(), ImmutableByteArray.make(DexUtil.getSignature(eMethod))); methodReference = MethodReference.findOrCreate(myClass.getReference(), name, D); } return methodReference; }
private MethodReference computeMethodReference() { try { Atom name = Atom.findOrCreateUnicodeAtom(getMethodName()); ImmutableByteArray desc = ImmutableByteArray.make(getMethodSignature()); Descriptor D = Descriptor.findOrCreate(declaringClass.getClassLoader().getLanguage(), desc); return MethodReference.findOrCreate(declaringClass.getReference(), name, D); } catch (InvalidClassFileException e) { Assertions.UNREACHABLE(); return null; } }
private MethodReference computeMethodReference() { try { Atom name = Atom.findOrCreateUnicodeAtom(getMethodName()); ImmutableByteArray desc = ImmutableByteArray.make(getMethodSignature()); Descriptor D = Descriptor.findOrCreate(declaringClass.getClassLoader().getLanguage(), desc); return MethodReference.findOrCreate(declaringClass.getReference(), name, D); } catch (InvalidClassFileException e) { Assertions.UNREACHABLE(); return null; } }