Codota Logo
GenericSignatureParser.scanSymbol
Code IndexAdd Codota to your IDE (free)

How to use
scanSymbol
method
in
libcore.reflect.GenericSignatureParser

Best Java code snippets using libcore.reflect.GenericSignatureParser.scanSymbol (Showing top 20 results out of 315)

  • Common ways to obtain GenericSignatureParser
private void myMethod () {
GenericSignatureParser g =
  • Codota IconClass klass;new GenericSignatureParser(klass.getClassLoader())
  • Codota IconMethod method;new GenericSignatureParser(method.getDeclaringClass().getClassLoader())
  • Codota IconConstructor function Object() { [native code] };new GenericSignatureParser(function Object() { [native code] }.getDeclaringClass().getClassLoader())
  • Smart code suggestions by Codota
}
origin: robovm/robovm

Type parseTypeSignature() {
  switch (symbol) {
  case 'B': scanSymbol(); return byte.class;
  case 'C': scanSymbol(); return char.class;
  case 'D': scanSymbol(); return double.class;
  case 'F': scanSymbol(); return float.class;
  case 'I': scanSymbol(); return int.class;
  case 'J': scanSymbol(); return long.class;
  case 'S': scanSymbol(); return short.class;
  case 'Z': scanSymbol(); return boolean.class;
  default:
    // Not an elementary type, but a FieldTypeSignature.
    return parseFieldTypeSignature();
  }
}
origin: robovm/robovm

void setInput(GenericDeclaration genericDecl, String input) {
  if (input != null) {
    this.genericDecl = genericDecl;
    this.buffer = input.toCharArray();
    this.eof = false;
    scanSymbol();
  }
  else {
    this.eof = true;
  }
}
origin: robovm/robovm

Type parseReturnType() {
  // ReturnType ::= TypeSignature | "V".
  if (symbol != 'V') { return parseTypeSignature(); }
  else { scanSymbol(); return void.class; }
}
origin: robovm/robovm

void expect(char c) {
  if (symbol == c) {
    scanSymbol();
  } else {
    throw new GenericSignatureFormatError();
  }
}
origin: robovm/robovm

} else {
  identifier = identBuf.toString();
  scanSymbol();
  return;
origin: robovm/robovm

Type parseClassTypeSignature() {
  // ClassTypeSignature ::= "L" {Ident "/"} Ident
  //         OptTypeArguments {"." Ident OptTypeArguments} ";".
  expect('L');
  StringBuilder qualIdent = new StringBuilder();
  scanIdentifier();
  while (symbol == '/') {
    scanSymbol();
    qualIdent.append(identifier).append(".");
    scanIdentifier();
  }
  qualIdent.append(this.identifier);
  ListOfTypes typeArgs = parseOptTypeArguments();
  ParameterizedTypeImpl parentType =
      new ParameterizedTypeImpl(null, qualIdent.toString(), typeArgs, loader);
  ParameterizedTypeImpl type = parentType;
  while (symbol == '.') {
    // Deal with Member Classes:
    scanSymbol();
    scanIdentifier();
    qualIdent.append("$").append(identifier); // FIXME: is "$" correct?
    typeArgs = parseOptTypeArguments();
    type = new ParameterizedTypeImpl(parentType, qualIdent.toString(), typeArgs,
        loader);
  }
  expect(';');
  return type;
}
origin: robovm/robovm

Type parseTypeArgument() {
  // TypeArgument ::= (["+" | "-"] FieldTypeSignature) | "*".
  ListOfTypes extendsBound = new ListOfTypes(1);
  ListOfTypes superBound = new ListOfTypes(1);
  if (symbol == '*') {
    scanSymbol();
    extendsBound.add(Object.class);
    return new WildcardTypeImpl(extendsBound, superBound);
  }
  else if (symbol == '+') {
    scanSymbol();
    extendsBound.add(parseFieldTypeSignature());
    return new WildcardTypeImpl(extendsBound, superBound);
  }
  else if (symbol == '-') {
    scanSymbol();
    superBound.add(parseFieldTypeSignature());
    extendsBound.add(Object.class);
    return new WildcardTypeImpl(extendsBound, superBound);
  }
  else {
    return parseFieldTypeSignature();
  }
}
origin: robovm/robovm

Type parseFieldTypeSignature() {
  // FieldTypeSignature ::= ClassTypeSignature | ArrayTypeSignature
  //         | TypeVariableSignature.
  switch (symbol) {
  case 'L':
    return parseClassTypeSignature();
  case '[':
    // ArrayTypeSignature ::= "[" TypSignature.
    scanSymbol();
    return new GenericArrayTypeImpl(parseTypeSignature());
  case 'T':
    return parseTypeVariableSignature();
  default:
    throw new GenericSignatureFormatError();
  }
}
origin: robovm/robovm

ListOfTypes parseOptTypeArguments() {
  // OptTypeArguments ::= "<" TypeArgument {TypeArgument} ">".
  ListOfTypes typeArgs = new ListOfTypes(8);
  if (symbol == '<') {
    scanSymbol();
    typeArgs.add(parseTypeArgument());
    while ((symbol != '>') && (symbol > 0)) {
      typeArgs.add(parseTypeArgument());
    }
    expect('>');
  }
  return typeArgs;
}
origin: robovm/robovm

TypeVariableImpl<GenericDeclaration> parseFormalTypeParameter() {
  // FormalTypeParameter ::= Ident ClassBound {InterfaceBound}.
  scanIdentifier();
  String name = identifier.intern(); // FIXME: is this o.k.?
  ListOfTypes bounds = new ListOfTypes(8);
  // ClassBound ::= ":" [FieldTypeSignature].
  expect(':');
  if (symbol == 'L' || symbol == '[' || symbol == 'T') {
    bounds.add(parseFieldTypeSignature());
  }
  while (symbol == ':') {
    // InterfaceBound ::= ":" FieldTypeSignature.
    scanSymbol();
    bounds.add(parseFieldTypeSignature());
  }
  return new TypeVariableImpl<GenericDeclaration>(genericDecl, name, bounds);
}
origin: robovm/robovm

void parseOptFormalTypeParameters() {
  // OptFormalTypeParameters ::=
  // ["<" FormalTypeParameter {FormalTypeParameter} ">"].
  ListOfVariables typeParams = new ListOfVariables();
  if (symbol == '<') {
    scanSymbol();
    typeParams.add(parseFormalTypeParameter());
    while ((symbol != '>') && (symbol > 0)) {
      typeParams.add(parseFormalTypeParameter());
    }
    expect('>');
  }
  this.formalTypeParameters = typeParams.getArray();
}
origin: robovm/robovm

exceptionTypes = new ListOfTypes(8);
do {
  scanSymbol();
origin: MobiVM/robovm

void setInput(GenericDeclaration genericDecl, String input) {
  if (input != null) {
    this.genericDecl = genericDecl;
    this.buffer = input.toCharArray();
    this.eof = false;
    scanSymbol();
  }
  else {
    this.eof = true;
  }
}
origin: ibinti/bugvm

void setInput(GenericDeclaration genericDecl, String input) {
  if (input != null) {
    this.genericDecl = genericDecl;
    this.buffer = input.toCharArray();
    this.eof = false;
    scanSymbol();
  }
  else {
    this.eof = true;
  }
}
origin: MobiVM/robovm

void expect(char c) {
  if (symbol == c) {
    scanSymbol();
  } else {
    throw new GenericSignatureFormatError();
  }
}
origin: MobiVM/robovm

Type parseReturnType() {
  // ReturnType ::= TypeSignature | "V".
  if (symbol != 'V') { return parseTypeSignature(); }
  else { scanSymbol(); return void.class; }
}
origin: ibinti/bugvm

void expect(char c) {
  if (symbol == c) {
    scanSymbol();
  } else {
    throw new GenericSignatureFormatError();
  }
}
origin: com.bugvm/bugvm-rt

void expect(char c) {
  if (symbol == c) {
    scanSymbol();
  } else {
    throw new GenericSignatureFormatError();
  }
}
origin: com.gluonhq/robovm-rt

void expect(char c) {
  if (symbol == c) {
    scanSymbol();
  } else {
    throw new GenericSignatureFormatError();
  }
}
origin: com.gluonhq/robovm-rt

Type parseReturnType() {
  // ReturnType ::= TypeSignature | "V".
  if (symbol != 'V') { return parseTypeSignature(); }
  else { scanSymbol(); return void.class; }
}
libcore.reflectGenericSignatureParserscanSymbol

Popular methods of GenericSignatureParser

  • <init>
  • expect
  • isStopSymbol
  • parseClassSignature
  • parseClassTypeSignature
  • parseFieldTypeSignature
  • parseForClass
    Parses the generic signature of a class and creates the data structure representing the signature.
  • parseForConstructor
    Parses the generic signature of a constructor and creates the data structure representing the signat
  • parseForField
    Parses the generic signature of a field and creates the data structure representing the signature.
  • parseForMethod
    Parses the generic signature of a method and creates the data structure representing the signature.
  • parseFormalTypeParameter
  • parseMethodTypeSignature
  • parseFormalTypeParameter,
  • parseMethodTypeSignature,
  • parseOptFormalTypeParameters,
  • parseOptTypeArguments,
  • parseReturnType,
  • parseTypeArgument,
  • parseTypeSignature,
  • parseTypeVariableSignature,
  • scanIdentifier

Popular in Java

  • Start an intent from android
  • scheduleAtFixedRate (ScheduledExecutorService)
  • getContentResolver (Context)
  • findViewById (Activity)
  • SocketException (java.net)
    This SocketException may be thrown during socket creation or setting options, and is the superclass
  • ReentrantLock (java.util.concurrent.locks)
    A reentrant mutual exclusion Lock with the same basic behavior and semantics as the implicit monitor
  • Annotation (javassist.bytecode.annotation)
    The annotation structure.An instance of this class is returned bygetAnnotations() in AnnotationsAttr
  • JButton (javax.swing)
  • JFileChooser (javax.swing)
  • Options (org.apache.commons.cli)
    Main entry-point into the library. Options represents a collection of Option objects, which describ
Codota Logo
  • Products

    Search for Java codeSearch for JavaScript codeEnterprise
  • IDE Plugins

    IntelliJ IDEAWebStormAndroid StudioEclipseVisual Studio CodePyCharmSublime TextPhpStormVimAtomGoLandRubyMineEmacsJupyter
  • Company

    About UsContact UsCareers
  • Resources

    FAQBlogCodota Academy Plugin user guide Terms of usePrivacy policyJava Code IndexJavascript Code Index
Get Codota for your IDE now