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; }
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); }
void parseClassSignature() { // ClassSignature ::= // OptFormalTypeParameters SuperclassSignature {SuperinterfaceSignature}. parseOptFormalTypeParameters(); // SuperclassSignature ::= ClassTypeSignature. this.superclassType = parseClassTypeSignature(); interfaceTypes = new ListOfTypes(16); while (symbol > 0) { // SuperinterfaceSignature ::= ClassTypeSignature. interfaceTypes.add(parseClassTypeSignature()); } }
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(); } }
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; }
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; }
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; }
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; }
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; }
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; }
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); }
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); }
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); }
void parseClassSignature() { // ClassSignature ::= // OptFormalTypeParameters SuperclassSignature {SuperinterfaceSignature}. parseOptFormalTypeParameters(); // SuperclassSignature ::= ClassTypeSignature. this.superclassType = parseClassTypeSignature(); interfaceTypes = new ListOfTypes(16); while (symbol > 0) { // SuperinterfaceSignature ::= ClassTypeSignature. interfaceTypes.add(parseClassTypeSignature()); } }
void parseClassSignature() { // ClassSignature ::= // OptFormalTypeParameters SuperclassSignature {SuperinterfaceSignature}. parseOptFormalTypeParameters(); // SuperclassSignature ::= ClassTypeSignature. this.superclassType = parseClassTypeSignature(); interfaceTypes = new ListOfTypes(16); while (symbol > 0) { // SuperinterfaceSignature ::= ClassTypeSignature. interfaceTypes.add(parseClassTypeSignature()); } }
void parseClassSignature() { // ClassSignature ::= // OptFormalTypeParameters SuperclassSignature {SuperinterfaceSignature}. parseOptFormalTypeParameters(); // SuperclassSignature ::= ClassTypeSignature. this.superclassType = parseClassTypeSignature(); interfaceTypes = new ListOfTypes(16); while (symbol > 0) { // SuperinterfaceSignature ::= ClassTypeSignature. interfaceTypes.add(parseClassTypeSignature()); } }
void parseClassSignature() { // ClassSignature ::= // OptFormalTypeParameters SuperclassSignature {SuperinterfaceSignature}. parseOptFormalTypeParameters(); // SuperclassSignature ::= ClassTypeSignature. this.superclassType = parseClassTypeSignature(); interfaceTypes = new ListOfTypes(16); while (symbol > 0) { // SuperinterfaceSignature ::= ClassTypeSignature. interfaceTypes.add(parseClassTypeSignature()); } }
void parseClassSignature() { // ClassSignature ::= // OptFormalTypeParameters SuperclassSignature {SuperinterfaceSignature}. parseOptFormalTypeParameters(); // SuperclassSignature ::= ClassTypeSignature. this.superclassType = parseClassTypeSignature(); interfaceTypes = new ListOfTypes(16); while (symbol > 0) { // SuperinterfaceSignature ::= ClassTypeSignature. interfaceTypes.add(parseClassTypeSignature()); } }
void parseClassSignature() { // ClassSignature ::= // OptFormalTypeParameters SuperclassSignature {SuperinterfaceSignature}. parseOptFormalTypeParameters(); // SuperclassSignature ::= ClassTypeSignature. this.superclassType = parseClassTypeSignature(); interfaceTypes = new ListOfTypes(16); while (symbol > 0) { // SuperinterfaceSignature ::= ClassTypeSignature. interfaceTypes.add(parseClassTypeSignature()); } }