Tabnine Logo
ArrayType
Code IndexAdd Tabnine to your IDE (free)

How to use
ArrayType
in
me.jamiemansfield.bombe.type

Best Java code snippets using me.jamiemansfield.bombe.type.ArrayType (Showing top 4 results out of 315)

origin: me.jamiemansfield/lorenz

private static FieldType handleNonePrefix(final FieldType type) {
  if (type instanceof ArrayType) {
    final ArrayType arr = (ArrayType) type;
    return new ArrayType(arr.getDimCount(), handleNonePrefix(arr.getComponent()));
  }
  if (type instanceof ObjectType) {
    final ObjectType obj = (ObjectType) type;
    return new ObjectType(handleNonePrefix(obj.getClassName()));
  }
  return type;
}
origin: me.jamiemansfield/lorenz

/**
 * Gets the de-obfuscated raw view of the type.
 *
 * @param type The type to de-obfuscate
 * @return The de-obfuscated raw view
 * @since 0.4.0
 */
default String deobfuscate(final Type type) {
  if (type instanceof ArrayType) {
    final ArrayType arr = (ArrayType) type;
    return arr.getDims() + this.deobfuscate(arr.getComponent());
  }
  else if (type instanceof ObjectType) {
    final ObjectType obj = (ObjectType) type;
    final Optional<? extends ClassMapping<?>> typeMapping = this.getClassMapping(obj.getClassName());
    return "L" + typeMapping.map(Mapping::getFullDeobfuscatedName).orElse(obj.getClassName()) + ";";
  }
  return type.toString();
}
origin: me.jamiemansfield/bombe-core

/**
 * Reads the next {@link ArrayType} from source.
 *
 * @return The type
 * @throws IllegalStateException If the descriptor is invalid
 */
public ArrayType readArrayType() {
  int count = 0;
  while (this.hasNext() && this.peek() == '[') {
    this.advance();
    count++;
  }
  return new ArrayType(count, this.readFieldType());
}
origin: me.jamiemansfield/lorenz

private static FieldType handleNonePrefix(final FieldType type) {
  if (type instanceof ArrayType) {
    final ArrayType arr = (ArrayType) type;
    return new ArrayType(arr.getDimCount(), handleNonePrefix(arr.getComponent()));
  }
  if (type instanceof ObjectType) {
    final ObjectType obj = (ObjectType) type;
    return new ObjectType(handleNonePrefix(obj.getClassName()));
  }
  return type;
}
me.jamiemansfield.bombe.typeArrayType

Javadoc

Represents an array type within Java.

Most used methods

  • <init>
    Creates a new array type, of the specified array dimensions, and Type component.
  • getComponent
    Gets the FieldType of the array.
  • getDimCount
    Gets the dimension count of the array.
  • getDims
    Gets the raw dimension descriptor of the array.

Popular in Java

  • Parsing JSON documents to java classes using gson
  • findViewById (Activity)
  • requestLocationUpdates (LocationManager)
  • runOnUiThread (Activity)
  • FileOutputStream (java.io)
    An output stream that writes bytes to a file. If the output file exists, it can be replaced or appen
  • PrintWriter (java.io)
    Wraps either an existing OutputStream or an existing Writerand provides convenience methods for prin
  • Permission (java.security)
    Legacy security code; do not use.
  • Date (java.util)
    A specific moment in time, with millisecond precision. Values typically come from System#currentTime
  • Queue (java.util)
    A collection designed for holding elements prior to processing. Besides basic java.util.Collection o
  • IsNull (org.hamcrest.core)
    Is the value null?
  • Top plugins for Android Studio
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