Tabnine Logo
Prototype.fromDescriptor
Code IndexAdd Tabnine to your IDE (free)

How to use
fromDescriptor
method
in
com.android.dx.rop.type.Prototype

Best Java code snippets using com.android.dx.rop.type.Prototype.fromDescriptor (Showing top 8 results out of 315)

origin: nikita36078/J2ME-Loader

/**
 * Constructs an instance. This constructor is private; use {@link #make}.
 *
 * @param descriptor the method descriptor
 */
private CstMethodType(CstString descriptor) {
  prototype = Prototype.fromDescriptor(descriptor.getString());
}
origin: com.jakewharton.android.repackaged/dalvik-dx

/**
 * Returns the unique instance corresponding to the
 * given method descriptor. See vmspec-2 sec4.3.3 for details on the
 * field descriptor syntax.
 *
 * @param descriptor {@code non-null;} the descriptor
 * @return {@code non-null;} the corresponding instance
 * @throws IllegalArgumentException thrown if the descriptor has
 * invalid syntax
 */
public static Prototype intern(String descriptor) {
  if (descriptor == null) {
    throw new NullPointerException("descriptor == null");
  }
  Prototype result = internTable.get(descriptor);
  if (result != null) {
    return result;
  }
  result = fromDescriptor(descriptor);
  return putIntern(result);
}
origin: nikita36078/J2ME-Loader

/**
 * Returns the unique instance corresponding to the
 * given method descriptor. See vmspec-2 sec4.3.3 for details on the
 * field descriptor syntax.
 *
 * @param descriptor {@code non-null;} the descriptor
 * @return {@code non-null;} the corresponding instance
 * @throws IllegalArgumentException thrown if the descriptor has
 * invalid syntax
 */
public static Prototype intern(String descriptor) {
  if (descriptor == null) {
    throw new NullPointerException("descriptor == null");
  }
  Prototype result = internTable.get(descriptor);
  if (result != null) {
    return result;
  }
  result = fromDescriptor(descriptor);
  return putIntern(result);
}
origin: com.jakewharton.android.repackaged/dalvik-dx

/**
 * Constructs an instance. This constructor is private; use {@link #make}.
 *
 * @param bootstrapMethodIndex The index of the bootstrap method in the bootstrap method table
 * @param nat the name and type
 */
private CstInvokeDynamic(int bootstrapMethodIndex, CstNat nat) {
  this.bootstrapMethodIndex = bootstrapMethodIndex;
  this.nat = nat;
  this.prototype = Prototype.fromDescriptor(nat.getDescriptor().toHuman());
  this.references = new ArrayList<>();
}
origin: com.jakewharton.android.repackaged/dalvik-dx

/**
 * Makes an instance for the given value. This may (but does not
 * necessarily) return an already-allocated instance.
 *
 * @param descriptor the method descriptor
 * @return {@code non-null;} the appropriate instance
 */
public static CstProtoRef make(CstString descriptor) {
  Prototype prototype = Prototype.fromDescriptor(descriptor.getString());
  return new CstProtoRef(prototype);
}
origin: nikita36078/J2ME-Loader

/**
 * Constructs an instance.
 *
 * @param definingClass {@code non-null;} the type of the defining class
 * @param nat {@code non-null;} the name-and-type
 */
/*package*/ CstBaseMethodRef(CstType definingClass, CstNat nat) {
  super(definingClass, nat);
  String descriptor = getNat().getDescriptor().getString();
  if (isSignaturePolymorphic()) {
    // The prototype for signature polymorphic methods is used to
    // construct call-site information and select the true invocation
    // target (invoke() or invokeExact(). The prototype is created
    // without being interned to avoid polluting the DEX file with
    // unused data.
    this.prototype = Prototype.fromDescriptor(descriptor);
  } else {
    this.prototype = Prototype.intern(descriptor);
  }
  this.instancePrototype = null;
}
origin: com.jakewharton.android.repackaged/dalvik-dx

/**
 * Constructs an instance.
 *
 * @param definingClass {@code non-null;} the type of the defining class
 * @param nat {@code non-null;} the name-and-type
 */
/*package*/ CstBaseMethodRef(CstType definingClass, CstNat nat) {
  super(definingClass, nat);
  String descriptor = getNat().getDescriptor().getString();
  if (isSignaturePolymorphic()) {
    // The prototype for signature polymorphic methods is used to
    // construct call-site information and select the true invocation
    // target (invoke() or invokeExact(). The prototype is created
    // without being interned to avoid polluting the DEX file with
    // unused data.
    this.prototype = Prototype.fromDescriptor(descriptor);
  } else {
    this.prototype = Prototype.intern(descriptor);
  }
  this.instancePrototype = null;
}
origin: com.jakewharton.android.repackaged/dalvik-dx

/**
 * Creates an instance of a {@code CstCallSite}.
 *
 * @param bootstrapHandle {@code non-null;} the bootstrap method handle to invoke
 * @param nat {@code non-null;} the name and type to be resolved by the bootstrap method handle
 * @param optionalArguments {@code null-ok;} optional arguments to provide to the bootstrap
 *     method
 * @return a new {@code CstCallSite} instance
 */
public static CstCallSite make(CstMethodHandle bootstrapHandle, CstNat nat,
                BootstrapMethodArgumentsList optionalArguments) {
  if (bootstrapHandle == null) {
    throw new NullPointerException("bootstrapMethodHandle == null");
  } else if (nat == null) {
    throw new NullPointerException("nat == null");
  }
  List list = new List(3 + optionalArguments.size());
  list.set(0, bootstrapHandle);
  list.set(1, nat.getName());
  list.set(2, new CstProtoRef(Prototype.fromDescriptor(nat.getDescriptor().getString())));
  if (optionalArguments != null) {
    for (int i = 0; i < optionalArguments.size(); ++i) {
      list.set(i + 3, optionalArguments.get(i));
    }
  }
  list.setImmutable();
  return new CstCallSite(list);
}
com.android.dx.rop.typePrototypefromDescriptor

Javadoc

Returns a prototype for a method descriptor. The Prototype returned will be the interned value if present, or a new instance otherwise. If a new instance is created, it is not placed in the intern table.

Popular methods of Prototype

  • intern
    Interns an instance, adding to the descriptor as necessary based on the given definer, name, and fla
  • getParameterTypes
    Gets the list of parameter types.
  • getReturnType
    Gets the return type.
  • <init>
    Constructs an instance. This is a private constructor; use one of the public static methods to get i
  • compareTo
  • getDescriptor
    Gets the descriptor string.
  • getParameterFrameTypes
    Gets the list of frame types corresponding to the list of parameter types. The difference between th
  • makeParameterArray
    Helper for #intern which returns an empty array to populate with parsed parameter types, and which a
  • putIntern
    Puts the given instance in the intern table if it's not already there. If a conflicting value is alr
  • withFirstParameter
    Returns a new interned instance, which is the same as this instance, except that it has an additiona
  • internInts
    Interns an instance which consists of the given number of ints along with the given return type
  • clearInternTable
  • internInts,
  • clearInternTable,
  • equals,
  • hashCode,
  • toString

Popular in Java

  • Making http requests using okhttp
  • requestLocationUpdates (LocationManager)
  • getSupportFragmentManager (FragmentActivity)
  • compareTo (BigDecimal)
  • InputStreamReader (java.io)
    A class for turning a byte stream into a character stream. Data read from the source input stream is
  • OutputStream (java.io)
    A writable sink for bytes.Most clients will use output streams that write data to the file system (
  • Collections (java.util)
    This class consists exclusively of static methods that operate on or return collections. It contains
  • Stream (java.util.stream)
    A sequence of elements supporting sequential and parallel aggregate operations. The following exampl
  • JFileChooser (javax.swing)
  • Logger (org.apache.log4j)
    This is the central class in the log4j package. Most logging operations, except configuration, are d
  • Top Vim plugins
Tabnine Logo
  • Products

    Search for Java codeSearch for JavaScript code
  • IDE Plugins

    IntelliJ IDEAWebStormVisual StudioAndroid StudioEclipseVisual Studio CodePyCharmSublime TextPhpStormVimGoLandRubyMineEmacsJupyter NotebookJupyter LabRiderDataGripAppCode
  • Company

    About UsContact UsCareers
  • Resources

    FAQBlogTabnine AcademyTerms of usePrivacy policyJava Code IndexJavascript Code Index
Get Tabnine for your IDE now