Add missing javadoc tags

This commit is contained in:
konsoletyper 2015-03-15 18:22:39 +03:00
parent 9ce9f970d7
commit 17ccec57e9
62 changed files with 96 additions and 55 deletions

View File

@ -24,6 +24,7 @@ import org.teavm.platform.metadata.ClassScopedMetadataProvider;
/** /**
* *
* @author Alexey Andreev * @author Alexey Andreev
* @param <T> class type.
*/ */
public class TClass<T> extends TObject { public class TClass<T> extends TObject {
TString name; TString name;

View File

@ -18,6 +18,7 @@ package org.teavm.classlib.java.lang;
/** /**
* *
* @author Alexey Andreev * @author Alexey Andreev
* @param <T> type this object is comparable to.
*/ */
public interface TComparable<T> { public interface TComparable<T> {
int compareTo(T other); int compareTo(T other);

View File

@ -21,6 +21,7 @@ import org.teavm.javascript.spi.Rename;
/** /**
* *
* @author Alexey Andreev * @author Alexey Andreev
* @param <E> type of enum.
*/ */
public abstract class TEnum<E extends TEnum<E>> extends TObject implements TComparable<E>, TSerializable { public abstract class TEnum<E extends TEnum<E>> extends TObject implements TComparable<E>, TSerializable {
private TString name; private TString name;

View File

@ -20,6 +20,7 @@ import org.teavm.classlib.java.util.TIterator;
/** /**
* *
* @author Alexey Andreev * @author Alexey Andreev
* @param <T> type this collection returns.
*/ */
public interface TIterable<T> { public interface TIterable<T> {
TIterator<T> iterator(); TIterator<T> iterator();

View File

@ -18,6 +18,7 @@ package org.teavm.classlib.java.lang;
/** /**
* *
* @author Alexey Andreev * @author Alexey Andreev
* @param <T> type of a value stored by thread local.
*/ */
public class TThreadLocal<T> extends TObject { public class TThreadLocal<T> extends TObject {
private boolean initialized; private boolean initialized;

View File

@ -20,6 +20,7 @@ import org.teavm.classlib.java.lang.TObject;
/** /**
* *
* @author Alexey Andreev * @author Alexey Andreev
* @param <T> type of an object to which this reference points.
*/ */
public abstract class TReference<T> extends TObject { public abstract class TReference<T> extends TObject {
public T get() { public T get() {

View File

@ -18,6 +18,7 @@ package org.teavm.classlib.java.lang.ref;
/** /**
* *
* @author Alexey Andreev * @author Alexey Andreev
* @param <T>
*/ */
public class TReferenceQueue<T> { public class TReferenceQueue<T> {
public TReference<T> poll() { public TReference<T> poll() {

View File

@ -18,6 +18,7 @@ package org.teavm.classlib.java.lang.ref;
/** /**
* *
* @author Alexey Andreev * @author Alexey Andreev
* @param <T>
*/ */
public class TWeakReference<T> extends TReference<T> { public class TWeakReference<T> extends TReference<T> {
private T value; private T value;

View File

@ -22,6 +22,7 @@ import org.teavm.classlib.java.lang.TUnsupportedOperationException;
/** /**
* *
* @author Alexey Andreev * @author Alexey Andreev
* @param <E>
*/ */
public abstract class TAbstractCollection<E> extends TObject implements TCollection<E> { public abstract class TAbstractCollection<E> extends TObject implements TCollection<E> {
protected TAbstractCollection() { protected TAbstractCollection() {

View File

@ -21,6 +21,7 @@ import org.teavm.javascript.spi.Rename;
/** /**
* *
* @author Alexey Andreev * @author Alexey Andreev
* @param <E>
*/ */
public abstract class TAbstractList<E> extends TAbstractCollection<E> implements TList<E> { public abstract class TAbstractList<E> extends TAbstractCollection<E> implements TList<E> {
protected transient int modCount; protected transient int modCount;

View File

@ -23,6 +23,8 @@ import org.teavm.classlib.java.lang.TUnsupportedOperationException;
/** /**
* *
* @author Alexey Andreev * @author Alexey Andreev
* @param <K>
* @param <V>
*/ */
public abstract class TAbstractMap<K, V> extends TObject implements TMap<K, V> { public abstract class TAbstractMap<K, V> extends TObject implements TMap<K, V> {
public static class SimpleEntry<K, V> implements TMap.Entry<K, V>, TSerializable { public static class SimpleEntry<K, V> implements TMap.Entry<K, V>, TSerializable {

View File

@ -20,6 +20,7 @@ import org.teavm.classlib.java.lang.TIllegalStateException;
/** /**
* *
* @author Alexey Andreev * @author Alexey Andreev
* @param <E>
*/ */
public abstract class TAbstractQueue<E> extends TAbstractCollection<E> implements TQueue<E> { public abstract class TAbstractQueue<E> extends TAbstractCollection<E> implements TQueue<E> {
@Override @Override

View File

@ -20,6 +20,7 @@ import org.teavm.classlib.java.lang.TIndexOutOfBoundsException;
/** /**
* *
* @author Alexey Andreev * @author Alexey Andreev
* @param <E>
*/ */
public abstract class TAbstractSequentialList<E> extends TAbstractList<E> { public abstract class TAbstractSequentialList<E> extends TAbstractList<E> {
@Override @Override

View File

@ -18,6 +18,7 @@ package org.teavm.classlib.java.util;
/** /**
* *
* @author Alexey Andreev * @author Alexey Andreev
* @param <E>
*/ */
public abstract class TAbstractSet<E> extends TAbstractCollection<E> implements TSet<E> { public abstract class TAbstractSet<E> extends TAbstractCollection<E> implements TSet<E> {
public TAbstractSet() { public TAbstractSet() {

View File

@ -21,6 +21,7 @@ import org.teavm.classlib.java.lang.*;
/** /**
* *
* @author Alexey Andreev * @author Alexey Andreev
* @param <E>
*/ */
public class TArrayDeque<E> extends TAbstractCollection<E> implements TDeque<E> { public class TArrayDeque<E> extends TAbstractCollection<E> implements TDeque<E> {
private int version; private int version;

View File

@ -23,6 +23,7 @@ import org.teavm.javascript.spi.Rename;
/** /**
* *
* @author Alexey Andreev * @author Alexey Andreev
* @param <E>
*/ */
public class TArrayList<E> extends TAbstractList<E> implements TCloneable, TSerializable { public class TArrayList<E> extends TAbstractList<E> implements TCloneable, TSerializable {
private E[] array; private E[] array;

View File

@ -20,6 +20,7 @@ import org.teavm.classlib.java.lang.TIterable;
/** /**
* *
* @author Alexey Andreev * @author Alexey Andreev
* @param <E>
*/ */
public interface TCollection<E> extends TIterable<E> { public interface TCollection<E> extends TIterable<E> {
int size(); int size();

View File

@ -18,6 +18,7 @@ package org.teavm.classlib.java.util;
/** /**
* *
* @author Alexey Andreev * @author Alexey Andreev
* @param <T>
*/ */
public interface TComparator<T> { public interface TComparator<T> {
int compare(T o1, T o2); int compare(T o1, T o2);

View File

@ -18,6 +18,7 @@ package org.teavm.classlib.java.util;
/** /**
* *
* @author Alexey Andreev * @author Alexey Andreev
* @param <E>
*/ */
public interface TDeque<E> extends TQueue<E> { public interface TDeque<E> extends TQueue<E> {
void addFirst(E e); void addFirst(E e);

View File

@ -18,6 +18,7 @@ package org.teavm.classlib.java.util;
/** /**
* *
* @author Alexey Andreev * @author Alexey Andreev
* @param <E>
*/ */
public interface TEnumeration<E> { public interface TEnumeration<E> {
boolean hasMoreElements(); boolean hasMoreElements();

View File

@ -25,6 +25,7 @@ import org.teavm.javascript.spi.Rename;
/** /**
* *
* @author Alexey Andreev * @author Alexey Andreev
* @param <E>
*/ */
public class THashSet<E> extends TAbstractSet<E> implements TCloneable, TSerializable { public class THashSet<E> extends TAbstractSet<E> implements TCloneable, TSerializable {
transient THashMap<E, THashSet<E>> backingMap; transient THashMap<E, THashSet<E>> backingMap;

View File

@ -18,6 +18,7 @@ package org.teavm.classlib.java.util;
/** /**
* *
* @author Alexey Andreev * @author Alexey Andreev
* @param <E>
*/ */
public interface TIterator<E> { public interface TIterator<E> {
boolean hasNext(); boolean hasNext();

View File

@ -19,6 +19,7 @@ package org.teavm.classlib.java.util;
/** /**
* *
* @author Alexey Andreev * @author Alexey Andreev
* @param <E>
*/ */
public class TLinkedList<E> extends TAbstractSequentialList<E> implements TDeque<E> { public class TLinkedList<E> extends TAbstractSequentialList<E> implements TDeque<E> {
static class Entry<E> { static class Entry<E> {

View File

@ -18,6 +18,7 @@ package org.teavm.classlib.java.util;
/** /**
* *
* @author Alexey Andreev * @author Alexey Andreev
* @param <E>
*/ */
public interface TList<E> extends TCollection<E> { public interface TList<E> extends TCollection<E> {
boolean addAll(int index, TCollection<? extends E> c); boolean addAll(int index, TCollection<? extends E> c);

View File

@ -18,6 +18,7 @@ package org.teavm.classlib.java.util;
/** /**
* *
* @author Alexey Andreev * @author Alexey Andreev
* @param <E>
*/ */
public interface TListIterator<E> extends TIterator<E> { public interface TListIterator<E> extends TIterator<E> {
boolean hasPrevious(); boolean hasPrevious();

View File

@ -18,6 +18,8 @@ package org.teavm.classlib.java.util;
/** /**
* *
* @author Alexey Andreev * @author Alexey Andreev
* @param <K>
* @param <V>
*/ */
public interface TMap<K, V> { public interface TMap<K, V> {
public static interface Entry<K1, V1> { public static interface Entry<K1, V1> {

View File

@ -18,6 +18,8 @@ package org.teavm.classlib.java.util;
/** /**
* *
* @author Alexey Andreev * @author Alexey Andreev
* @param <K>
* @param <V>
*/ */
public interface TNavigableMap<K, V> extends TSortedMap<K, V> { public interface TNavigableMap<K, V> extends TSortedMap<K, V> {
Entry<K, V> lowerEntry(K key); Entry<K, V> lowerEntry(K key);

View File

@ -18,6 +18,7 @@ package org.teavm.classlib.java.util;
/** /**
* *
* @author Alexey Andreev * @author Alexey Andreev
* @param <E>
*/ */
public interface TNavigableSet<E> extends TSortedSet<E> { public interface TNavigableSet<E> extends TSortedSet<E> {
E lower(E e); E lower(E e);

View File

@ -25,6 +25,7 @@ import org.teavm.classlib.java.lang.TNullPointerException;
/** /**
* *
* @author Alexey Andreev * @author Alexey Andreev
* @param <E>
*/ */
public class TPriorityQueue<E> extends TAbstractQueue<E> implements TSerializable { public class TPriorityQueue<E> extends TAbstractQueue<E> implements TSerializable {
private Object[] data; private Object[] data;

View File

@ -18,6 +18,7 @@ package org.teavm.classlib.java.util;
/** /**
* *
* @author Alexey Andreev * @author Alexey Andreev
* @param <E>
*/ */
public interface TQueue<E> extends TCollection<E> { public interface TQueue<E> extends TCollection<E> {
boolean offer(E e); boolean offer(E e);

View File

@ -21,6 +21,7 @@ import org.teavm.platform.PlatformClass;
/** /**
* *
* @author Alexey Andreev * @author Alexey Andreev
* @param <S>
*/ */
public final class TServiceLoader<S> extends TObject implements TIterable<S> { public final class TServiceLoader<S> extends TObject implements TIterable<S> {
private Object[] services; private Object[] services;

View File

@ -18,6 +18,7 @@ package org.teavm.classlib.java.util;
/** /**
* *
* @author Alexey Andreev * @author Alexey Andreev
* @param <E>
*/ */
public interface TSet<E> extends TCollection<E> { public interface TSet<E> extends TCollection<E> {
} }

View File

@ -20,6 +20,7 @@ import org.teavm.classlib.java.lang.TBoolean;
/** /**
* *
* @author Alexey Andreev * @author Alexey Andreev
* @param <E>
*/ */
public class TSetFromMap<E> extends TAbstractSet<E> { public class TSetFromMap<E> extends TAbstractSet<E> {
private TMap<E, TBoolean> map; private TMap<E, TBoolean> map;

View File

@ -18,6 +18,8 @@ package org.teavm.classlib.java.util;
/** /**
* *
* @author Alexey Andreev * @author Alexey Andreev
* @param <K>
* @param <V>
*/ */
public interface TSortedMap<K, V> extends TMap<K, V> { public interface TSortedMap<K, V> extends TMap<K, V> {
TComparator<? super K> comparator(); TComparator<? super K> comparator();

View File

@ -18,6 +18,7 @@ package org.teavm.classlib.java.util;
/** /**
* *
* @author Alexey Andreev * @author Alexey Andreev
* @param <E>
*/ */
public interface TSortedSet<E> extends TSet<E> { public interface TSortedSet<E> extends TSet<E> {
TComparator<? super E> comparator(); TComparator<? super E> comparator();

View File

@ -3,6 +3,7 @@ package org.teavm.classlib.java.util;
/** /**
* *
* @author Alexey Andreev * @author Alexey Andreev
* @param <E>
*/ */
public class TTreeSet<E> extends TAbstractSet<E> implements TNavigableSet<E> { public class TTreeSet<E> extends TAbstractSet<E> implements TNavigableSet<E> {
private static final Object VALUE = new Object(); private static final Object VALUE = new Object();

View File

@ -21,6 +21,7 @@ import org.teavm.classlib.java.lang.TObject;
/** /**
* *
* @author Alexey Andreev * @author Alexey Andreev
* @param <V>
*/ */
public interface TCallable<V extends TObject> { public interface TCallable<V extends TObject> {
V call() throws TException; V call() throws TException;

View File

@ -68,12 +68,6 @@ abstract class TAbstractCharClass extends TSpecialToken {
*/ */
protected boolean mayContainSupplCodepoints = false; protected boolean mayContainSupplCodepoints = false;
/**
* Returns true if this char class contains character specified;
*
* @param ch
* character to check;
*/
abstract public boolean contains(int ch); abstract public boolean contains(int ch);
/** /**

View File

@ -143,14 +143,6 @@ abstract class TAbstractSet {
return -1; return -1;
} }
/**
* Returns true, if this node has consumed any characters during positive
* match attempt, for example node representing character always consumes
* one character if it matches. If particular node matches empty sting this
* method will return false;
*
* @param matchResult
*/
public abstract boolean hasConsumed(TMatchResultImpl matchResult); public abstract boolean hasConsumed(TMatchResultImpl matchResult);
/** /**
@ -175,9 +167,6 @@ abstract class TAbstractSet {
return getQualifiedName(); return getQualifiedName();
} }
/**
* Returns the next.
*/
public TAbstractSet getNext() { public TAbstractSet getNext() {
return next; return next;
} }

View File

@ -46,16 +46,6 @@ class TCompositeGroupQuantifierSet extends TGroupQuantifierSet {
int setCounter; int setCounter;
/**
* Constructs CompositeGroupQuantifierSet
*
* @param quant
* - given composite quantifier
* @param innerSet
* - given group
* @param next
* - next set after the quantifier
*/
public TCompositeGroupQuantifierSet(TQuantifier quant, TAbstractSet innerSet, TAbstractSet next, int type, public TCompositeGroupQuantifierSet(TQuantifier quant, TAbstractSet innerSet, TAbstractSet next, int type,
int setCounter) { int setCounter) {
super(innerSet, next, type); super(innerSet, next, type);

View File

@ -38,10 +38,6 @@ abstract class TLeafSet extends TAbstractSet {
public TLeafSet() { public TLeafSet() {
} }
/**
* Returns "shift", the number of accepted chars commonly internal function,
* but called by quantifiers.
*/
public abstract int accepts(int stringIndex, CharSequence testString); public abstract int accepts(int stringIndex, CharSequence testString);
/** /**

View File

@ -281,34 +281,21 @@ class TLexer {
return lookAheadST != null; return lookAheadST != null;
} }
/**
* Returns current character and moves string index to the next one;
*
*/
public int next() { public int next() {
movePointer(); movePointer();
return lookBack; return lookBack;
} }
/**
* Returns current special token and moves string index to the next one;
*/
public TSpecialToken nextSpecial() { public TSpecialToken nextSpecial() {
TSpecialToken res = curST; TSpecialToken res = curST;
movePointer(); movePointer();
return res; return res;
} }
/**
* Returns nest symbol read.
*/
public int lookAhead() { public int lookAhead() {
return lookAhead; return lookAhead;
} }
/**
* Returns previous character.
*/
public int back() { public int back() {
return lookBack; return lookBack;
} }
@ -780,9 +767,6 @@ class TLexer {
return ch == 0 && lookAhead == 0 && index == patternFullLength && !isSpecial(); return ch == 0 && lookAhead == 0 && index == patternFullLength && !isSpecial();
} }
/**
* Returns true if current character is plain token.
*/
public static boolean isLetter(int ch) { public static boolean isLetter(int ch) {
// all supplementary codepoints have integer value that is >= 0; // all supplementary codepoints have integer value that is >= 0;
@ -1061,9 +1045,6 @@ class TLexer {
return high; return high;
} }
/**
* Returns the curr. character index.
*/
public int getIndex() { public int getIndex() {
return curToc; return curToc;
} }

View File

@ -35,9 +35,6 @@ abstract class TQuantifierSet extends TAbstractSet {
setType(type); setType(type);
} }
/**
* Returns the innerSet.
*/
public TAbstractSet getInnerSet() { public TAbstractSet getInnerSet() {
return innerSet; return innerSet;
} }

View File

@ -23,23 +23,31 @@ import org.teavm.model.MethodReference;
* @author Alexey Andreev * @author Alexey Andreev
*/ */
public interface CallGraphNode { public interface CallGraphNode {
/* /**
* Returns reference to entire call graph. * Returns reference to entire call graph.
*
* @return graph
*/ */
CallGraph getGraph(); CallGraph getGraph();
/** /**
* Returns the method that this node represents. * Returns the method that this node represents.
*
* @return method
*/ */
MethodReference getMethod(); MethodReference getMethod();
/** /**
* Returns immutable collection of all call sites that are in the method. * Returns immutable collection of all call sites that are in the method.
*
* @return call site
*/ */
Collection<? extends CallSite> getCallSites(); Collection<? extends CallSite> getCallSites();
/** /**
* Returns immutable collection of all call sites that call this method. * Returns immutable collection of all call sites that call this method.
*
* @return call sites
*/ */
Collection<? extends CallSite> getCallerCallSites(); Collection<? extends CallSite> getCallerCallSites();

View File

@ -31,11 +31,15 @@ public interface CallSite {
/** /**
* <p>Gets a method that this call site invokes.</p> * <p>Gets a method that this call site invokes.</p>
*
* @return a node that represent methods being called
*/ */
CallGraphNode getCallee(); CallGraphNode getCallee();
/** /**
* <p>Gets a method that contains this call site.</p> * <p>Gets a method that contains this call site.</p>
*
* @return a node that represents methods's caller
*/ */
CallGraphNode getCaller(); CallGraphNode getCaller();
} }

View File

@ -20,6 +20,9 @@ import java.util.*;
/** /**
* *
* @author Alexey Andreev * @author Alexey Andreev
*
* @param <T> which type this mapper takes.
* @param <R> which type this mapper produces.
*/ */
public class CachedMapper<T, R> implements Mapper<T, R> { public class CachedMapper<T, R> implements Mapper<T, R> {
private Mapper<T, R> innerMapper; private Mapper<T, R> innerMapper;

View File

@ -18,6 +18,8 @@ package org.teavm.common;
/** /**
* *
* @author Alexey Andreev * @author Alexey Andreev
* @param <T> which type this mapper takes.
* @param <R> which type this mapper produces.
*/ */
public interface Mapper<T, R> { public interface Mapper<T, R> {
R map(T preimage); R map(T preimage);

View File

@ -140,6 +140,7 @@ public class TeaVM implements TeaVMHost, ServiceRepository {
* Reports whether this TeaVM instance uses obfuscation when generating the JavaScript code. * Reports whether this TeaVM instance uses obfuscation when generating the JavaScript code.
* *
* @see #setMinifying(boolean) * @see #setMinifying(boolean)
* @return whether TeaVM produces obfuscated code.
*/ */
public boolean isMinifying() { public boolean isMinifying() {
return minifying; return minifying;
@ -149,6 +150,7 @@ public class TeaVM implements TeaVMHost, ServiceRepository {
* Specifies whether this TeaVM instance uses obfuscation when generating the JavaScript code. * Specifies whether this TeaVM instance uses obfuscation when generating the JavaScript code.
* *
* @see #isMinifying() * @see #isMinifying()
* @param minifying whether TeaVM should obfuscate code.
*/ */
public void setMinifying(boolean minifying) { public void setMinifying(boolean minifying) {
this.minifying = minifying; this.minifying = minifying;
@ -287,6 +289,8 @@ public class TeaVM implements TeaVMHost, ServiceRepository {
/** /**
* Gets a {@link ClassReaderSource} which is used by this TeaVM instance. It is exactly what was * Gets a {@link ClassReaderSource} which is used by this TeaVM instance. It is exactly what was
* passed to {@link TeaVMBuilder#setClassSource(ClassHolderSource)}. * passed to {@link TeaVMBuilder#setClassSource(ClassHolderSource)}.
*
* @return class source.
*/ */
public ClassReaderSource getClassSource() { public ClassReaderSource getClassSource() {
return classSource; return classSource;
@ -322,6 +326,8 @@ public class TeaVM implements TeaVMHost, ServiceRepository {
* @param writer where to generate JavaScript. Should not be null. * @param writer where to generate JavaScript. Should not be null.
* @param target where to generate additional resources. Can be null, but if there are * @param target where to generate additional resources. Can be null, but if there are
* plugins or inteceptors that generate additional resources, the build process will fail. * plugins or inteceptors that generate additional resources, the build process will fail.
*
* @throws RenderingException when something went wrong during rendering phase.
*/ */
public void build(Appendable writer, BuildTarget target) throws RenderingException { public void build(Appendable writer, BuildTarget target) throws RenderingException {
// Check dependencies // Check dependencies

View File

@ -46,6 +46,7 @@ public interface TeaVMHost {
/** /**
* Gets class loaded that is used by TeaVM. This class loader is usually specified by * Gets class loaded that is used by TeaVM. This class loader is usually specified by
* {@link TeaVMBuilder#setClassLoader(ClassLoader)} * {@link TeaVMBuilder#setClassLoader(ClassLoader)}
* @return class loader that can be used by plugins.
*/ */
ClassLoader getClassLoader(); ClassLoader getClassLoader();

View File

@ -22,6 +22,7 @@ import org.teavm.jso.JSProperty;
/** /**
* *
* @author Alexey Andreev * @author Alexey Andreev
* @param <T> type of nodes in this map.
*/ */
public interface NamedNodeMap<T extends Node> extends JSObject, JSArrayReader<T> { public interface NamedNodeMap<T extends Node> extends JSObject, JSArrayReader<T> {
T getNamedItem(String name); T getNamedItem(String name);

View File

@ -21,6 +21,7 @@ import org.teavm.jso.JSProperty;
/** /**
* *
* @author Alexey Andreev * @author Alexey Andreev
* @param <T> type of nodes in this list.
*/ */
public interface NodeList<T extends Node> extends JSArrayReader<T> { public interface NodeList<T extends Node> extends JSArrayReader<T> {
T item(int index); T item(int index);

View File

@ -18,6 +18,7 @@ package org.teavm.jso;
/** /**
* *
* @author Alexey Andreev * @author Alexey Andreev
* @param <T>
*/ */
public interface JSArray<T extends JSObject> extends JSArrayReader<T> { public interface JSArray<T extends JSObject> extends JSArrayReader<T> {
@JSIndexer @JSIndexer

View File

@ -18,6 +18,7 @@ package org.teavm.jso;
/** /**
* *
* @author Alexey Andreev * @author Alexey Andreev
* @param <T>
*/ */
public interface JSArrayReader<T extends JSObject> extends JSObject { public interface JSArrayReader<T extends JSObject> extends JSObject {
@JSProperty @JSProperty

View File

@ -18,6 +18,7 @@ package org.teavm.jso;
/** /**
* *
* @author Alexey Andreev * @author Alexey Andreev
* @param <T>
*/ */
@JSFunctor @JSFunctor
public interface JSSortFunction<T extends JSObject> { public interface JSSortFunction<T extends JSObject> {

View File

@ -24,6 +24,7 @@ import org.teavm.platform.plugin.PlatformQueueGenerator;
/** /**
* *
* @author Alexey Andreev * @author Alexey Andreev
* @param <T>
*/ */
public abstract class PlatformQueue<T> implements JSObject { public abstract class PlatformQueue<T> implements JSObject {
@JSProperty @JSProperty

View File

@ -22,6 +22,7 @@ import org.teavm.jso.JSProperty;
/** /**
* *
* @author Alexey Andreev * @author Alexey Andreev
* @param <T>
*/ */
public interface PlatformSequence<T extends JSObject> extends JSObject { public interface PlatformSequence<T extends JSObject> extends JSObject {
@JSProperty @JSProperty

View File

@ -18,6 +18,7 @@ package org.teavm.platform.async;
/** /**
* *
* @author Alexey Andreev * @author Alexey Andreev
* @param <T>
*/ */
public interface AsyncCallback<T> { public interface AsyncCallback<T> {
void complete(T result); void complete(T result);

View File

@ -60,6 +60,7 @@ public interface MetadataGenerator {
* *
* @param context context that contains useful compile-time information. * @param context context that contains useful compile-time information.
* @param method method which will be used to access the generated resources at run time. * @param method method which will be used to access the generated resources at run time.
* @return resource to be attached to method at run time.
*/ */
Resource generateMetadata(MetadataGeneratorContext context, MethodReference method); Resource generateMetadata(MetadataGeneratorContext context, MethodReference method);
} }

View File

@ -31,44 +31,62 @@ import org.teavm.vm.TeaVM;
public interface MetadataGeneratorContext extends ServiceRepository { public interface MetadataGeneratorContext extends ServiceRepository {
/** /**
* Gets the collection of all classes that were achieved by the dependency checker. * Gets the collection of all classes that were achieved by the dependency checker.
*
* @return class source.
*/ */
ListableClassReaderSource getClassSource(); ListableClassReaderSource getClassSource();
/** /**
* Gets the class loader that is used by the compiler. * Gets the class loader that is used by the compiler.
* @return class loader.
*/ */
ClassLoader getClassLoader(); ClassLoader getClassLoader();
/** /**
* Gets properties that were specified to {@link TeaVM}. * Gets properties that were specified to {@link TeaVM}.
*
* @return properties.
*/ */
Properties getProperties(); Properties getProperties();
/** /**
* Creates a new resource of the given type. The description of valid resources * Creates a new resource of the given type. The description of valid resources
* is available in documentation for {@link Resource}. * is available in documentation for {@link Resource}.
*
* @param resourceType type of resource to create.
* @return a new resource
*/ */
<T extends Resource> T createResource(Class<T> resourceType); <T extends Resource> T createResource(Class<T> resourceType);
/** /**
* Creates a new resource that represents class literal. Client code then may use * Creates a new resource that represents class literal. Client code then may use
* {@link Platform#classFromResource(ClassResource)} to get actual class. * {@link Platform#classFromResource(ClassResource)} to get actual class.
*
* @param className class to which resource is to point.
* @return a new resource.
*/ */
ClassResource createClassResource(String className); ClassResource createClassResource(String className);
/** /**
* Creates a new resource that represents static field. Client code then may use * Creates a new resource that represents static field. Client code then may use
* {@link Platform#objectFromResource(StaticFieldResource)} to get actual field value. * {@link Platform#objectFromResource(StaticFieldResource)} to get actual field value.
*
* @param field field for which to create resource.
* @return a new resource.
*/ */
StaticFieldResource createFieldResource(FieldReference field); StaticFieldResource createFieldResource(FieldReference field);
/** /**
* Creates a new resource array. * Creates a new resource array.
*
* @return a new resource.
*/ */
<T extends Resource> ResourceArray<T> createResourceArray(); <T extends Resource> ResourceArray<T> createResourceArray();
/** /**
* Creates a new resource map. * Creates a new resource map.
*
* @return a new resource.
*/ */
<T extends Resource> ResourceMap<T> createResourceMap(); <T extends Resource> ResourceMap<T> createResourceMap();
} }

View File

@ -18,6 +18,7 @@ package org.teavm.platform.metadata;
/** /**
* *
* @author Alexey Andreev * @author Alexey Andreev
* @param <T>
*/ */
public interface ResourceArray<T extends Resource> extends Resource { public interface ResourceArray<T extends Resource> extends Resource {
int size(); int size();

View File

@ -18,6 +18,7 @@ package org.teavm.platform.metadata;
/** /**
* *
* @author Alexey Andreev * @author Alexey Andreev
* @param <T>
*/ */
public interface ResourceMap<T extends Resource> extends Resource { public interface ResourceMap<T extends Resource> extends Resource {
boolean has(String key); boolean has(String key);

View File

@ -535,7 +535,7 @@ public class TreeMapTest {
!myTreeMap.containsValue(new Integer(0))); !myTreeMap.containsValue(new Integer(0)));
} }
/** /*
* Tests entrySet().contains() method behaviour with respect to entries * Tests entrySet().contains() method behaviour with respect to entries
* with null values. * with null values.
* Regression test for HARMONY-5788. * Regression test for HARMONY-5788.