mirror of
https://github.com/twiglet/cs2j.git
synced 2025-01-18 13:15:17 +01:00
Add Generic classes
This commit is contained in:
parent
01a5d58bd1
commit
caaf13f4d3
@ -1,161 +0,0 @@
|
||||
<?xml version="1.0" encoding="utf-8"?>
|
||||
<!--
|
||||
|
||||
This file is
|
||||
|
||||
Copyright 2007,2008,2009,2010 Rustici Software, LLC
|
||||
Copyright 2010,2011 Kevin Glynn (kevin.glynn.com)
|
||||
|
||||
-->
|
||||
<Class xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance" xmlns:xsd="http://www.w3.org/2001/XMLSchema" xmlns="urn:www.twigletsoftware.com:schemas:txtemplate:1:0">
|
||||
<Imports>
|
||||
<Import>java.util.Hashtable</Import>
|
||||
</Imports>
|
||||
<Java>Hashtable</Java>
|
||||
<Name>System.Collections.Generic.Dictionary</Name>
|
||||
<Uses />
|
||||
<Inherits>
|
||||
<Type>System.Collections.ICollection</Type>
|
||||
<Type>System.Collections.IDictionary</Type>
|
||||
</Inherits>
|
||||
<Methods>
|
||||
<Method>
|
||||
<Imports />
|
||||
<Java>${this:16}.put(${key}, ${value})</Java>
|
||||
<Params>
|
||||
<Param>
|
||||
<Type>System.Object</Type>
|
||||
<Name>key</Name>
|
||||
</Param>
|
||||
<Param>
|
||||
<Type>System.Object</Type>
|
||||
<Name>value</Name>
|
||||
</Param>
|
||||
</Params>
|
||||
<Name>Add</Name>
|
||||
<Return>System.Int32</Return>
|
||||
</Method>
|
||||
<Method>
|
||||
<Imports />
|
||||
<Java>${this:16}.containsKey(${key})</Java>
|
||||
<Params>
|
||||
<Param>
|
||||
<Type>System.Object</Type>
|
||||
<Name>key</Name>
|
||||
</Param>
|
||||
</Params>
|
||||
<Name>Contains</Name>
|
||||
<Return>System.Boolean</Return>
|
||||
</Method>
|
||||
<Method>
|
||||
<Imports />
|
||||
<Java>${this:16}.containsKey(${key})</Java>
|
||||
<Params>
|
||||
<Param>
|
||||
<Type>System.Object</Type>
|
||||
<Name>key</Name>
|
||||
</Param>
|
||||
</Params>
|
||||
<Name>ContainsKey</Name>
|
||||
<Return>System.Boolean</Return>
|
||||
</Method>
|
||||
<Method>
|
||||
<Imports />
|
||||
<Java>${this:16}.get(${key})</Java>
|
||||
<Params>
|
||||
<Param>
|
||||
<Type>System.Object</Type>
|
||||
<Name>key</Name>
|
||||
</Param>
|
||||
</Params>
|
||||
<Name>get___idx</Name>
|
||||
<Return>System.Object</Return>
|
||||
</Method>
|
||||
<Method>
|
||||
<Imports />
|
||||
<Java>${this:16}.put(${key}, ${value})</Java>
|
||||
<Params>
|
||||
<Param>
|
||||
<Type>System.Object</Type>
|
||||
<Name>key</Name>
|
||||
</Param>
|
||||
<Param>
|
||||
<Type>System.Object</Type>
|
||||
<Name>value</Name>
|
||||
</Param>
|
||||
</Params>
|
||||
<Name>set___idx</Name>
|
||||
<Return>System.Void</Return>
|
||||
</Method>
|
||||
</Methods>
|
||||
<Properties>
|
||||
<Property>
|
||||
<Imports />
|
||||
<Java>${this:16}.size()</Java>
|
||||
<Type>System.Int32</Type>
|
||||
<Name>Count</Name>
|
||||
<Get>${this:16}.size()</Get>
|
||||
<Set>${this:16}.setCount(${value})</Set>
|
||||
</Property>
|
||||
<Property>
|
||||
<Imports />
|
||||
<Java>${this:16}.keySet()</Java>
|
||||
<Type>System.Collections.ICollection</Type>
|
||||
<Name>Keys</Name>
|
||||
<Get>${this:16}.keySet()</Get>
|
||||
<Set>${this:16}.setKeys(${value})</Set>
|
||||
</Property>
|
||||
</Properties>
|
||||
<Events />
|
||||
<Indexers>
|
||||
<Indexer>
|
||||
<Imports />
|
||||
<Params>
|
||||
<Param>
|
||||
<Type>System.Object</Type>
|
||||
<Name>key</Name>
|
||||
</Param>
|
||||
</Params>
|
||||
<Type>System.Object</Type>
|
||||
<Get>${this:16}.get(${key})</Get>
|
||||
<Set>${this:16}.put(${key}, ${value})</Set>
|
||||
</Indexer>
|
||||
</Indexers>
|
||||
<Constructors>
|
||||
<Constructor>
|
||||
<Imports>
|
||||
<Import>java.util.Hashtable</Import>
|
||||
</Imports>
|
||||
<Java>new Hashtable()</Java>
|
||||
<Params />
|
||||
</Constructor>
|
||||
<Constructor>
|
||||
<Imports>
|
||||
<Import>java.util.Hashtable</Import>
|
||||
</Imports>
|
||||
<Java>new Hashtable(${length})</Java>
|
||||
<Params>
|
||||
<Param>
|
||||
<Type>System.Int32</Type>
|
||||
<Name>length</Name>
|
||||
</Param>
|
||||
</Params>
|
||||
</Constructor>
|
||||
<Constructor>
|
||||
<Imports>
|
||||
<Import>java.util.Hashtable</Import>
|
||||
</Imports>
|
||||
<Java>new Hashtable(${collection})</Java>
|
||||
<Params>
|
||||
<Param>
|
||||
<Type>System.ICollection</Type>
|
||||
<Name>collection</Name>
|
||||
</Param>
|
||||
</Params>
|
||||
</Constructor>
|
||||
</Constructors>
|
||||
<Fields />
|
||||
<Casts />
|
||||
<UnaryOps />
|
||||
<BinaryOps />
|
||||
</Class>
|
@ -0,0 +1,24 @@
|
||||
<?xml version="1.0" encoding="utf-8"?>
|
||||
<!--
|
||||
|
||||
This file is
|
||||
|
||||
Copyright 2010,2011 Kevin Glynn (kevin.glynn.com)
|
||||
|
||||
-->
|
||||
<Interface xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance" xmlns:xsd="http://www.w3.org/2001/XMLSchema" xmlns="urn:www.twigletsoftware.com:schemas:txtemplate:1:0">
|
||||
<Imports>
|
||||
<Import>java.util.Collection</Import>
|
||||
</Imports>
|
||||
<Java>Collection*[${T}]*</Java>
|
||||
<Name>System.Collections.Generic.ICollection</Name>
|
||||
<TypeParams>
|
||||
<Name>T</Name>
|
||||
</TypeParams>
|
||||
<Iterable>
|
||||
<ElementType>T</ElementType>
|
||||
<Java>${expr}</Java>
|
||||
</Iterable>
|
||||
<Properties>
|
||||
</Properties>
|
||||
</Interface>
|
@ -0,0 +1,37 @@
|
||||
<?xml version="1.0" encoding="utf-8"?>
|
||||
<!--
|
||||
|
||||
This file is
|
||||
|
||||
Copyright 2010,2011 Kevin Glynn (kevin.glynn.com)
|
||||
|
||||
-->
|
||||
<Interface xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance" xmlns:xsd="http://www.w3.org/2001/XMLSchema" xmlns="urn:www.twigletsoftware.com:schemas:txtemplate:1:0">
|
||||
<Imports>
|
||||
<Import>java.util.Map</Import>
|
||||
</Imports>
|
||||
<Java>Map*[${K},${V}]*</Java>
|
||||
<Name>System.Collections.Generic.IDictionary</Name>
|
||||
<TypeParams>
|
||||
<Name>K</Name>
|
||||
<Name>V</Name>
|
||||
</TypeParams>
|
||||
<Iterable>
|
||||
<ElementType>System.Collections.Generic.KeyValuePair*[K,V]*</ElementType>
|
||||
<Java>${expr}.entrySet()</Java>
|
||||
</Iterable>
|
||||
<Properties>
|
||||
<Property>
|
||||
<Imports />
|
||||
<Type>System.Collections.Generic.ICollection*[K]*</Type>
|
||||
<Name>Keys</Name>
|
||||
<Get>${this:16}.keySet()</Get>
|
||||
</Property>
|
||||
<Property>
|
||||
<Imports />
|
||||
<Type>System.Collections.Generic.ICollection*[V]*</Type>
|
||||
<Name>Values</Name>
|
||||
<Get>${this:16}.values()</Get>
|
||||
</Property>
|
||||
</Properties>
|
||||
</Interface>
|
@ -0,0 +1,19 @@
|
||||
<?xml version="1.0" encoding="utf-8"?>
|
||||
<!--
|
||||
|
||||
This file is
|
||||
|
||||
Copyright 2010,2011 Kevin Glynn (kevin.glynn.com)
|
||||
|
||||
-->
|
||||
<Struct xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance" xmlns:xsd="http://www.w3.org/2001/XMLSchema" xmlns="urn:www.twigletsoftware.com:schemas:txtemplate:1:0">
|
||||
<Imports>
|
||||
<Import>java.util.Map.Entry</Import>
|
||||
</Imports>
|
||||
<Java>Entry*[${K},${V}]*</Java>
|
||||
<Name>System.Collections.Generic.KeyValuePair</Name>
|
||||
<TypeParams>
|
||||
<Name>K</Name>
|
||||
<Name>V</Name>
|
||||
</TypeParams>
|
||||
</Struct>
|
Loading…
x
Reference in New Issue
Block a user