Top Inners Fields Constructors Methods
org.python.compiler

public Class ProxyCodeHelpers

extends Object
Class Inheritance
Known Direct Subclasses
org.python.compiler.ProxyMaker
Imports
java.lang.reflect.Constructor, .Method, java.util.Map, .Map.Entry, org.objectweb.asm.Type, org.python.core.Py, .PyException, .PyMethod, .PyObject, .PyProxy, .PyReflectedFunction, org.python.util.Generic

Nested and Inner Type Summary

Modifier and TypeClass and Description
public static class
public static class
public static class

Field Summary

Modifier and TypeField and Description
public static final int
public static final int
public static final int
public static final int
public static final int
public static final int
public static final int
public static final int
public static final int
public static final int
public static final int
public static Map<Class<?>, Integer>

Constructor Summary

AccessConstructor and Description
public

Method Summary

Modifier and TypeMethod and Description
public static void
doNullReturn(Code code, Class<?> type)

public static void
doReturn(Code code, Class<?> type)

public static Map<Class<?>, Integer>
public static PyObject
findPython(PyProxy proxy, String name)

Retrieves name from the PyObject in proxy if it's defined in Python.

public static int
getType(Class<?> c)

public static String
makeSig(Class<?> ret, Class<?>... sig)

public static String
makeSig(String returnType, String... parameterTypes)

public static String
public static String[]
mapClasses(Class<?>[] classes)

public static String[]
mapExceptions(Class<?>[] classes)

public static String
mapType(Class<?> type)

public static PyException
Inherited from java.lang.Object:
cloneequalsfinalizegetClasshashCodenotifynotifyAlltoStringwaitwaitwait

Field Detail

tBooleanback to summary
public static final int tBoolean
tByteback to summary
public static final int tByte
tCharacterback to summary
public static final int tCharacter
tDoubleback to summary
public static final int tDouble
tFloatback to summary
public static final int tFloat
tIntegerback to summary
public static final int tInteger
tLongback to summary
public static final int tLong
tNoneback to summary
public static final int tNone
tOtherback to summary
public static final int tOther
tShortback to summary
public static final int tShort
tVoidback to summary
public static final int tVoid
typesback to summary
public static Map<Class<?>, Integer> types

Constructor Detail

ProxyCodeHelpersback to summary
public ProxyCodeHelpers()

Method Detail

doNullReturnback to summary
public static void doNullReturn(Code code, Class<?> type) throws Exception
doReturnback to summary
public static void doReturn(Code code, Class<?> type) throws Exception
fillTypesback to summary
public static Map<Class<?>, Integer> fillTypes()
findPythonback to summary
public static PyObject findPython(PyProxy proxy, String name)

Retrieves name from the PyObject in proxy if it's defined in Python. This is a specialized helper function for internal PyProxy use.

getTypeback to summary
public static int getType(Class<?> c)
makeSigback to summary
public static String makeSig(Class<?> ret, Class<?>... sig)
makeSigback to summary
public static String makeSig(String returnType, String... parameterTypes)
mapClassback to summary
public static String mapClass(Class<?> c)
mapClassesback to summary
public static String[] mapClasses(Class<?>[] classes)
mapExceptionsback to summary
public static String[] mapExceptions(Class<?>[] classes)
mapTypeback to summary
public static String mapType(Class<?> type)
notImplementedAbstractMethodback to summary
public static PyException notImplementedAbstractMethod(PyProxy proxy, String name, String superClass)
org.python.compiler back to summary

public Class ProxyCodeHelpers.AnnotationDescr

extends Object
Class Inheritance

Field Summary

Modifier and TypeField and Description
public final Class<?>
public final Map<String, Object>

Constructor Summary

AccessConstructor and Description
public
AnnotationDescr(Class<?> annotation)

public
AnnotationDescr(Class<?> annotation, Map<String, Object> fields)

Method Summary

Modifier and TypeMethod and Description
public Map<String, Object>
public String
public boolean
public int
hashCode()

Overrides java.lang.Object.hashCode.

Returns a hash code value for this object.

Inherited from java.lang.Object:
cloneequalsfinalizegetClassnotifynotifyAlltoStringwaitwaitwait

Field Detail

annotationback to summary
public final Class<?> annotation
fieldsback to summary
public final Map<String, Object> fields

Constructor Detail

AnnotationDescrback to summary
public AnnotationDescr(Class<?> annotation)
AnnotationDescrback to summary
public AnnotationDescr(Class<?> annotation, Map<String, Object> fields)

Method Detail

getFieldsback to summary
public Map<String, Object> getFields()
getNameback to summary
public String getName()
hasFieldsback to summary
public boolean hasFields()
hashCodeback to summary
public int hashCode()

Overrides java.lang.Object.hashCode.

Doc from java.lang.Object.hashCode.

Returns a hash code value for this object. This method is supported for the benefit of hash tables such as those provided by java.util.HashMap.

The general contract of hashCode is:

  • Whenever it is invoked on the same object more than once during an execution of a Java application, the hashCode method must consistently return the same integer, provided no information used in equals comparisons on the object is modified. This integer need not remain consistent from one execution of an application to another execution of the same application.
  • If two objects are equal according to the equals method, then calling the hashCode method on each of the two objects must produce the same integer result.
  • It is not required that if two objects are unequal according to the equals method, then calling the hashCode method on each of the two objects must produce distinct integer results. However, the programmer should be aware that producing distinct integer results for unequal objects may improve the performance of hash tables.
Returns:int

a hash code value for this object

Annotations
@Override

org.python.compiler back to summary

public Class ProxyCodeHelpers.ConstructorDescr

extends MethodDescr
Class Inheritance

Field Summary

Inherited from org.python.compiler.ProxyCodeHelpers.MethodDescr:
exceptionsmethodAnnotationsnameparameterAnnotationsparametersreturnType

Constructor Summary

AccessConstructor and Description
public
public
ConstructorDescr(Class<?>[] parameters, Class<?>[] exceptions)

Method Summary

Inherited from org.python.compiler.ProxyCodeHelpers.MethodDescr:
equalshashCode

Constructor Detail

ConstructorDescrback to summary
public ConstructorDescr(Constructor<?> cons)
ConstructorDescrback to summary
public ConstructorDescr(Class<?>[] parameters, Class<?>[] exceptions)
org.python.compiler back to summary

public Class ProxyCodeHelpers.MethodDescr

extends Object
Class Inheritance
Known Direct Subclasses
org.python.compiler.ProxyCodeHelpers.ConstructorDescr

Field Summary

Modifier and TypeField and Description
public final Class<?>[]
public final Map<String, Object>
public final String
public final Map<String, Object>[]
public final Class<?>[]
public final Class<?>

Constructor Summary

AccessConstructor and Description
public
public
MethodDescr(String name, Class<?> returnType, Class<?>[] parameters, Class<?>[] exceptions)

public
MethodDescr(String name, Class<?> returnType, Class<?>[] parameters, Class<?>[] exceptions, Map<String, Object> methodAnnotations, Map<String, Object>[] parameterAnnotations)

Method Summary

Modifier and TypeMethod and Description
public boolean
equals(Object
the reference object with which to compare.
obj
)

Overrides java.lang.Object.equals.

Indicates whether some other object is "equal to" this one.

public int
hashCode()

Overrides java.lang.Object.hashCode.

Returns a hash code value for this object.

Inherited from java.lang.Object:
clonefinalizegetClassnotifynotifyAlltoStringwaitwaitwait

Field Detail

exceptionsback to summary
public final Class<?>[] exceptions
methodAnnotationsback to summary
public final Map<String, Object> methodAnnotations
nameback to summary
public final String name
parameterAnnotationsback to summary
public final Map<String, Object>[] parameterAnnotations
parametersback to summary
public final Class<?>[] parameters
returnTypeback to summary
public final Class<?> returnType

Constructor Detail

MethodDescrback to summary
public MethodDescr(Method m)
MethodDescrback to summary
public MethodDescr(String name, Class<?> returnType, Class<?>[] parameters, Class<?>[] exceptions)
MethodDescrback to summary
public MethodDescr(String name, Class<?> returnType, Class<?>[] parameters, Class<?>[] exceptions, Map<String, Object> methodAnnotations, Map<String, Object>[] parameterAnnotations)

Method Detail

equalsback to summary
public boolean equals(Object obj)

Overrides java.lang.Object.equals.

Doc from java.lang.Object.equals.

Indicates whether some other object is "equal to" this one.

The equals method implements an equivalence relation on non-null object references:

  • It is reflexive: for any non-null reference value x, x.equals(x) should return true.
  • It is symmetric: for any non-null reference values x and y, x.equals(y) should return true if and only if y.equals(x) returns true.
  • It is transitive: for any non-null reference values x, y, and z, if x.equals(y) returns true and y.equals(z) returns true, then x.equals(z) should return true.
  • It is consistent: for any non-null reference values x and y, multiple invocations of x.equals(y) consistently return true or consistently return false, provided no information used in equals comparisons on the objects is modified.
  • For any non-null reference value x, x.equals(null) should return false.

An equivalence relation partitions the elements it operates on into equivalence classes; all the members of an equivalence class are equal to each other. Members of an equivalence class are substitutable for each other, at least for some purposes.

Parameters
obj:Object

the reference object with which to compare.

Returns:boolean

true if this object is the same as the obj argument; false otherwise.

Annotations
@Override

hashCodeback to summary
public int hashCode()

Overrides java.lang.Object.hashCode.

Doc from java.lang.Object.hashCode.

Returns a hash code value for this object. This method is supported for the benefit of hash tables such as those provided by java.util.HashMap.

The general contract of hashCode is:

  • Whenever it is invoked on the same object more than once during an execution of a Java application, the hashCode method must consistently return the same integer, provided no information used in equals comparisons on the object is modified. This integer need not remain consistent from one execution of an application to another execution of the same application.
  • If two objects are equal according to the equals method, then calling the hashCode method on each of the two objects must produce the same integer result.
  • It is not required that if two objects are unequal according to the equals method, then calling the hashCode method on each of the two objects must produce distinct integer results. However, the programmer should be aware that producing distinct integer results for unequal objects may improve the performance of hash tables.
Returns:int

a hash code value for this object

Annotations
@Override