Package org.python.core
Class PyShadowString
- java.lang.Object
-
- org.python.core.PyObject
-
- org.python.core.PySequence
-
- org.python.core.PyBaseString
-
- org.python.core.PyString
-
- org.python.core.PyShadowString
-
- All Implemented Interfaces:
java.io.Serializable
,java.lang.CharSequence
,BufferProtocol
public class PyShadowString extends PyString
- See Also:
- Serialized Form
-
-
Nested Class Summary
-
Nested classes/interfaces inherited from class org.python.core.PyObject
PyObject.ConversionException
-
-
Field Summary
Fields Modifier and Type Field Description static PyType
TYPE
-
Fields inherited from class org.python.core.PyObject
gcMonitorGlobal
-
-
Constructor Summary
Constructors Constructor Description PyShadowString()
PyShadowString(java.lang.String str, java.lang.String shadow)
PyShadowString(java.lang.String str, java.lang.String shadow, boolean isBytes)
PyShadowString(java.lang.String str, java.lang.String shadow, boolean isBytes, PyList targets)
PyShadowString(PyObject str, java.lang.String shadow)
PyShadowString(PyType subtype, java.lang.String str, java.lang.String shadow)
PyShadowString(PyType subtype, PyObject str, java.lang.String shadow)
-
Method Summary
All Methods Instance Methods Concrete Methods Modifier and Type Method Description PyObject
__eq__(PyObject other)
Equivalent to the standard Python __eq__ method.PyString
__repr__()
Equivalent to the standard Python __repr__ method.void
addTarget(java.lang.String className, java.lang.String methodName)
PyString
getshadow()
java.lang.String
getShadow()
PyList
getTargets()
void
shadowstr_addtarget(PyObject classname, PyObject methodname)
PyObject
shadowstr_getshadow()
PyObject
shadowstr_gettargets()
boolean
startswith(PyObject prefix)
Equivalent to the Pythonstr.startswith
method testing whether a string starts with a specified prefix.boolean
startswith(PyObject prefix, PyObject start)
Equivalent to the Pythonstr.startswith
method, testing whether a string starts with a specified prefix, where a sub-range is specified by[start:]
.boolean
startswith(PyObject prefix, PyObject start, PyObject end)
Equivalent to the Pythonstr.startswith
method, testing whether a string starts with a specified prefix, where a sub-range is specified by[start:end]
.-
Methods inherited from class org.python.core.PyString
__add__, __cmp__, __complex__, __contains__, __float__, __format__, __ge__, __getnewargs__, __gt__, __int__, __invert__, __le__, __len__, __long__, __lt__, __mod__, __mul__, __ne__, __neg__, __pos__, __rmul__, __str__, __tojava__, __unicode__, asDouble, asInt, asLong, asName, asString, asString, atof, atoi, atoi, atol, atol, capitalize, center, charAt, count, count, count, count, count, count, createInstance, decode, decode, decode, decode_UnicodeEscape, encode, encode, encode, encode_UnicodeEscape, encode_UnicodeEscape, endswith, endswith, endswith, expandtabs, expandtabs, find, find, find, find, find, find, fromInterned, getBuffer, getInt, getString, hashCode, index, index, index, index, index, index, internedString, isalnum, isalpha, isBasicPlane, isdecimal, isdigit, islower, isnumeric, isspace, istitle, isunicode, isupper, join, length, ljust, ljust, lower, lstrip, lstrip, lstrip, partition, replace, replace, rfind, rfind, rfind, rfind, rfind, rfind, rindex, rindex, rindex, rindex, rindex, rindex, rjust, rpartition, rsplit, rsplit, rsplit, rsplit, rsplit, rstrip, rstrip, rstrip, split, split, split, split, split, splitlines, splitlines, str___mod__, strip, strip, strip, subSequence, substring, swapcase, title, toBytes, toCodePoints, toString, translate, translate, translate, translate, upper, zfill
-
Methods inherited from class org.python.core.PySequence
__delitem__, __delslice__, __finditem__, __finditem__, __getitem__, __getslice__, __iter__, __nonzero__, __setitem__, __setitem__, __setslice__, isMappingType, isNumberType, isSequenceType
-
Methods inherited from class org.python.core.PyObject
__abs__, __and__, __call__, __call__, __call__, __call__, __call__, __call__, __call__, __call__, __call__, __call__, __call__, __call__, __call__, __call__, __call__, __call__, __coerce__, __coerce_ex__, __delattr__, __delattr__, __delete__, __delitem__, __delslice__, __dir__, __div__, __divmod__, __ensure_finalizer__, __findattr__, __findattr__, __findattr_ex__, __finditem__, __floordiv__, __get__, __getattr__, __getattr__, __getitem__, __getslice__, __hash__, __hex__, __iadd__, __iand__, __idiv__, __idivmod__, __ifloordiv__, __ilshift__, __imod__, __imul__, __index__, __ior__, __ipow__, __irshift__, __isub__, __iternext__, __itruediv__, __ixor__, __lshift__, __not__, __oct__, __or__, __pow__, __pow__, __radd__, __rand__, __rdiv__, __rdivmod__, __reduce__, __reduce_ex__, __reduce_ex__, __rfloordiv__, __rlshift__, __rmod__, __ror__, __rpow__, __rrshift__, __rshift__, __rsub__, __rtruediv__, __rxor__, __set__, __setattr__, __setattr__, __setitem__, __setslice__, __sub__, __truediv__, __trunc__, __xor__, _add, _and, _callextra, _cmp, _div, _divmod, _doget, _doget, _doset, _eq, _floordiv, _ge, _gt, _iadd, _iand, _idiv, _idivmod, _ifloordiv, _ilshift, _imod, _imul, _in, _ior, _ipow, _irshift, _is, _isnot, _isub, _itruediv, _ixor, _jcall, _jcallexc, _jthrow, _le, _lshift, _lt, _mod, _mul, _ne, _notin, _or, _pow, _rshift, _sub, _truediv, _xor, asIndex, asIndex, asInt, asIterable, asLong, asName, asStringOrNull, asStringOrNull, bit_length, conjugate, delDict, delType, dispatch__init__, equals, fastGetClass, fastGetDict, getDict, getType, implementsDescrDelete, implementsDescrGet, implementsDescrSet, invoke, invoke, invoke, invoke, invoke, invoke, isCallable, isDataDescr, isIndex, isInteger, noAttributeError, object___subclasshook__, readonlyAttributeError, setDict, setType
-
-
-
-
Field Detail
-
TYPE
public static final PyType TYPE
-
-
Constructor Detail
-
PyShadowString
public PyShadowString()
-
PyShadowString
public PyShadowString(java.lang.String str, java.lang.String shadow)
-
PyShadowString
public PyShadowString(java.lang.String str, java.lang.String shadow, boolean isBytes)
-
PyShadowString
public PyShadowString(java.lang.String str, java.lang.String shadow, boolean isBytes, PyList targets)
-
PyShadowString
public PyShadowString(PyObject str, java.lang.String shadow)
-
PyShadowString
public PyShadowString(PyType subtype, java.lang.String str, java.lang.String shadow)
-
-
Method Detail
-
getShadow
public java.lang.String getShadow()
-
getshadow
public PyString getshadow()
-
shadowstr_getshadow
public final PyObject shadowstr_getshadow()
-
addTarget
public void addTarget(java.lang.String className, java.lang.String methodName)
-
getTargets
public PyList getTargets()
-
shadowstr_gettargets
public final PyObject shadowstr_gettargets()
-
__eq__
public PyObject __eq__(PyObject other)
Description copied from class:PyObject
Equivalent to the standard Python __eq__ method.
-
startswith
public boolean startswith(PyObject prefix)
Description copied from class:PyString
Equivalent to the Pythonstr.startswith
method testing whether a string starts with a specified prefix.prefix
can also be a tuple of prefixes to look for.- Overrides:
startswith
in classPyString
- Parameters:
prefix
- string to check for (or aPyTuple
of them).- Returns:
true
if this string slice starts with a specified prefix, otherwisefalse
.
-
startswith
public boolean startswith(PyObject prefix, PyObject start)
Description copied from class:PyString
Equivalent to the Pythonstr.startswith
method, testing whether a string starts with a specified prefix, where a sub-range is specified by[start:]
.start
is interpreted as in slice notation, with null orPy.None
representing "missing".prefix
can also be a tuple of prefixes to look for.- Overrides:
startswith
in classPyString
- Parameters:
prefix
- string to check for (or aPyTuple
of them).start
- start of slice.- Returns:
true
if this string slice starts with a specified prefix, otherwisefalse
.
-
startswith
public boolean startswith(PyObject prefix, PyObject start, PyObject end)
Description copied from class:PyString
Equivalent to the Pythonstr.startswith
method, testing whether a string starts with a specified prefix, where a sub-range is specified by[start:end]
. Argumentsstart
andend
are interpreted as in slice notation, with null orPy.None
representing "missing".prefix
can also be a tuple of prefixes to look for.- Overrides:
startswith
in classPyString
- Parameters:
prefix
- string to check for (or aPyTuple
of them).start
- start of slice.end
- end of slice.- Returns:
true
if this string slice starts with a specified prefix, otherwisefalse
.
-
__repr__
public PyString __repr__()
Description copied from class:PyObject
Equivalent to the standard Python __repr__ method. This method should not typically need to be overrriden. The easiest way to configure the string representation of aPyObject
is to override the standard JavatoString
method.
-
-