Tabnine Logo
GenericSignatureParser.scanSymbol
Code IndexAdd Tabnine 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)

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

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

void expect(char c) {
  if (symbol == c) {
    scanSymbol();
  } else {
    throw new GenericSignatureFormatError();
  }
}
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

  • Reading from database using SQL prepared statement
  • runOnUiThread (Activity)
  • getContentResolver (Context)
  • startActivity (Activity)
  • EOFException (java.io)
    Thrown when a program encounters the end of a file or stream during an input operation.
  • Thread (java.lang)
    A thread is a thread of execution in a program. The Java Virtual Machine allows an application to ha
  • MalformedURLException (java.net)
    This exception is thrown when a program attempts to create an URL from an incorrect specification.
  • IsNull (org.hamcrest.core)
    Is the value null?
  • Runner (org.openjdk.jmh.runner)
  • Logger (org.slf4j)
    The org.slf4j.Logger interface is the main user entry point of SLF4J API. It is expected that loggin
  • CodeWhisperer alternatives
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