Top Description Fields Constructors Methods
org.jruby.lexer

public Class ByteListLexerSource

extends LexerSource
Class Inheritance
Imports
org.jcodings.Encoding, org.jruby.RubyArray, .RubyIO, org.jruby.runtime.builtin.IRubyObject, org.jruby.util.ByteList, org.jruby.util.io.ChannelHelper, java.io.ByteArrayInputStream, java.nio.channels.Channel

Lexer source for ripper when we have all bytes available to us.

Field Summary

Modifier and TypeField and Description
private final ByteList
private int
Inherited from org.jruby.lexer.LexerSource:
scriptLines

Constructor Summary

AccessConstructor and Description
public
ByteListLexerSource(String
is the file we are reading
sourceName
,
int
starting line number for source (used by eval)
line
,
ByteList
the ByteList backing the source we want to lex
in
,
RubyArray<T extends IRubyObject> list)

Create our food-source for the lexer.

Method Summary

Modifier and TypeMethod and Description
public Encoding
public int
public Channel
public IRubyObject
public ByteList
gets()

Implements abstract org.jruby.lexer.LexerSource.gets.

public void
Inherited from org.jruby.lexer.LexerSource:
encodeExistingScriptLinesgetFilenamegetLineOffset

Field Detail

completeSourceback to summary
private final ByteList completeSource
offsetback to summary
private int offset

Constructor Detail

ByteListLexerSourceback to summary
public ByteListLexerSource(String sourceName, int line, ByteList in, RubyArray<T extends IRubyObject> list)

Create our food-source for the lexer.

Parameters
sourceName:String

is the file we are reading

line:int

starting line number for source (used by eval)

in:ByteList

the ByteList backing the source we want to lex

Method Detail

getEncodingback to summary
public Encoding getEncoding()

Implements abstract org.jruby.lexer.LexerSource.getEncoding.

Annotations
@Override
getOffsetback to summary
public int getOffset()

Implements abstract org.jruby.lexer.LexerSource.getOffset.

Annotations
@Override
getRemainingAsChannelback to summary
public Channel getRemainingAsChannel()

Implements abstract org.jruby.lexer.LexerSource.getRemainingAsChannel.

Annotations
@Override
getRemainingAsIOback to summary
public IRubyObject getRemainingAsIO()

Implements abstract org.jruby.lexer.LexerSource.getRemainingAsIO.

Annotations
@Override
getsback to summary
public ByteList gets()

Implements abstract org.jruby.lexer.LexerSource.gets.

Annotations
@Override
setEncodingback to summary
public void setEncoding(Encoding encoding)

Implements abstract org.jruby.lexer.LexerSource.setEncoding.

Annotations
@Override