congrats Icon
New! Tabnine Pro 14-day free trial
Start a free trial
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

  • Updating database using SQL prepared statement
  • getSharedPreferences (Context)
  • putExtra (Intent)
  • getApplicationContext (Context)
  • BorderLayout (java.awt)
    A border layout lays out a container, arranging and resizing its components to fit in five regions:
  • ConnectException (java.net)
    A ConnectException is thrown if a connection cannot be established to a remote host on a specific po
  • Socket (java.net)
    Provides a client-side TCP socket.
  • URL (java.net)
    A Uniform Resource Locator that identifies the location of an Internet resource as specified by RFC
  • JTable (javax.swing)
  • Options (org.apache.commons.cli)
    Main entry-point into the library. Options represents a collection of Option objects, which describ
  • 14 Best Plugins for Eclipse
Tabnine Logo
  • Products

    Search for Java codeSearch for JavaScript code
  • IDE Plugins

    IntelliJ IDEAWebStormVisual StudioAndroid StudioEclipseVisual Studio CodePyCharmSublime TextPhpStormVimAtomGoLandRubyMineEmacsJupyter NotebookJupyter LabRiderDataGripAppCode
  • Company

    About UsContact UsCareers
  • Resources

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