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
* @param <T> class type.
*/
public class TClass<T> extends TObject {
TString name;

View File

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

View File

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

View File

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

View File

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

View File

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

View File

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

View File

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

View File

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

View File

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

View File

@ -23,6 +23,8 @@ import org.teavm.classlib.java.lang.TUnsupportedOperationException;
/**
*
* @author Alexey Andreev
* @param <K>
* @param <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 {

View File

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

View File

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

View File

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

View File

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

View File

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

View File

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

View File

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

View File

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

View File

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

View File

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

View File

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

View File

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

View File

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

View File

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

View File

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

View File

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

View File

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

View File

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

View File

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

View File

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

View File

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

View File

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

View File

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

View File

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

View File

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

View File

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

View File

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

View File

@ -143,14 +143,6 @@ abstract class TAbstractSet {
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);
/**
@ -175,9 +167,6 @@ abstract class TAbstractSet {
return getQualifiedName();
}
/**
* Returns the next.
*/
public TAbstractSet getNext() {
return next;
}

View File

@ -46,16 +46,6 @@ class TCompositeGroupQuantifierSet extends TGroupQuantifierSet {
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,
int setCounter) {
super(innerSet, next, type);

View File

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

View File

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

View File

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

View File

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

View File

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

View File

@ -20,6 +20,9 @@ import java.util.*;
/**
*
* @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> {
private Mapper<T, R> innerMapper;

View File

@ -18,6 +18,8 @@ package org.teavm.common;
/**
*
* @author Alexey Andreev
* @param <T> which type this mapper takes.
* @param <R> which type this mapper produces.
*/
public interface Mapper<T, R> {
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.
*
* @see #setMinifying(boolean)
* @return whether TeaVM produces obfuscated code.
*/
public boolean isMinifying() {
return minifying;
@ -149,6 +150,7 @@ public class TeaVM implements TeaVMHost, ServiceRepository {
* Specifies whether this TeaVM instance uses obfuscation when generating the JavaScript code.
*
* @see #isMinifying()
* @param minifying whether TeaVM should obfuscate code.
*/
public void setMinifying(boolean 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
* passed to {@link TeaVMBuilder#setClassSource(ClassHolderSource)}.
*
* @return class source.
*/
public ClassReaderSource getClassSource() {
return classSource;
@ -322,6 +326,8 @@ public class TeaVM implements TeaVMHost, ServiceRepository {
* @param writer where to generate JavaScript. Should not be null.
* @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.
*
* @throws RenderingException when something went wrong during rendering phase.
*/
public void build(Appendable writer, BuildTarget target) throws RenderingException {
// 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
* {@link TeaVMBuilder#setClassLoader(ClassLoader)}
* @return class loader that can be used by plugins.
*/
ClassLoader getClassLoader();

View File

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

View File

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

View File

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

View File

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

View File

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

View File

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

View File

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

View File

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

View File

@ -60,6 +60,7 @@ public interface MetadataGenerator {
*
* @param context context that contains useful compile-time information.
* @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);
}

View File

@ -31,44 +31,62 @@ import org.teavm.vm.TeaVM;
public interface MetadataGeneratorContext extends ServiceRepository {
/**
* Gets the collection of all classes that were achieved by the dependency checker.
*
* @return class source.
*/
ListableClassReaderSource getClassSource();
/**
* Gets the class loader that is used by the compiler.
* @return class loader.
*/
ClassLoader getClassLoader();
/**
* Gets properties that were specified to {@link TeaVM}.
*
* @return properties.
*/
Properties getProperties();
/**
* Creates a new resource of the given type. The description of valid resources
* 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);
/**
* Creates a new resource that represents class literal. Client code then may use
* {@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);
/**
* Creates a new resource that represents static field. Client code then may use
* {@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);
/**
* Creates a new resource array.
*
* @return a new resource.
*/
<T extends Resource> ResourceArray<T> createResourceArray();
/**
* Creates a new resource map.
*
* @return a new resource.
*/
<T extends Resource> ResourceMap<T> createResourceMap();
}

View File

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

View File

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

View File

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