Package org.codehaus.groovy.reflection
Class GeneratedMetaMethod.DgmMethodRecord
java.lang.Object
org.codehaus.groovy.reflection.GeneratedMetaMethod.DgmMethodRecord
- All Implemented Interfaces:
Serializable
- Enclosing class:
- GeneratedMetaMethod
One generated default-Groovy-method adapter, as written to
META-INF/dgminfo.
parameters[0] is the receiver type.- See Also:
-
Field Summary
FieldsModifier and TypeFieldDescriptionInternal name of the generated adapter,org/codehaus/groovy/runtime/dgm$plus its index.Name of the extension method.Class[]Native parameter types of the extension method, with the receiver at index 0.Return type of the extension method. -
Constructor Summary
Constructors -
Method Summary
Modifier and TypeMethodDescriptionReadsMETA-INF/dgminfofrom this class's loader.static voidsaveDgmInfo(List<GeneratedMetaMethod.DgmMethodRecord> records, String file) Writesrecordstofile.
-
Field Details
-
className
Internal name of the generated adapter,org/codehaus/groovy/runtime/dgm$plus its index. -
methodName
Name of the extension method. -
returnType
Return type of the extension method. -
parameters
Native parameter types of the extension method, with the receiver at index 0.
-
-
Constructor Details
-
DgmMethodRecord
public DgmMethodRecord()
-
-
Method Details
-
saveDgmInfo
public static void saveDgmInfo(List<GeneratedMetaMethod.DgmMethodRecord> records, String file) throws IOException Writesrecordstofile. Primitive classes take the first ids, then each distinct return type and parameter type. A blank UTF string ends the class table. Each record then stores its class name, method name, return-type id, and parameter-type ids.- Parameters:
records- the adapters to persistfile- path of the file to write- Throws:
IOException- when the file cannot be written
-
loadDgmInfo
ReadsMETA-INF/dgminfofrom this class's loader. A record is omitted when its return type or any parameter type could not be loaded. Primitive classes are taken from the fixed table rather than loaded by name.A missing
META-INF/dgminfofails immediately.- Returns:
- the records whose classes all loaded
- Throws:
IOException- when the resource cannot be read
-