code
stringlengths
23
201k
docstring
stringlengths
17
96.2k
func_name
stringlengths
0
235
language
stringclasses
1 value
repo
stringlengths
8
72
path
stringlengths
11
317
url
stringlengths
57
377
license
stringclasses
7 values
@NonNull public RevBlob lookupBlob(AnyObjectId id) { RevBlob c = (RevBlob) objects.get(id); if (c == null) { c = new RevBlob(id); objects.add(c); } return c; }
Locate a reference to a blob without loading it. <p> The blob may or may not exist in the repository. It is impossible to tell from this method's return value. @param id name of the blob object. @return reference to the blob object. Never null.
lookupBlob
java
theonedev/onedev
server-core/src/main/java/org/eclipse/jgit/revwalk/RevWalk.java
https://github.com/theonedev/onedev/blob/master/server-core/src/main/java/org/eclipse/jgit/revwalk/RevWalk.java
MIT
@NonNull public RevTree lookupTree(AnyObjectId id) { RevTree c = (RevTree) objects.get(id); if (c == null) { c = new RevTree(id); objects.add(c); } return c; }
Locate a reference to a tree without loading it. <p> The tree may or may not exist in the repository. It is impossible to tell from this method's return value. @param id name of the tree object. @return reference to the tree object. Never null.
lookupTree
java
theonedev/onedev
server-core/src/main/java/org/eclipse/jgit/revwalk/RevWalk.java
https://github.com/theonedev/onedev/blob/master/server-core/src/main/java/org/eclipse/jgit/revwalk/RevWalk.java
MIT
@NonNull public RevTag lookupTag(AnyObjectId id) { RevTag c = (RevTag) objects.get(id); if (c == null) { c = new RevTag(id); objects.add(c); } return c; }
Locate a reference to a tag without loading it. <p> The tag may or may not exist in the repository. It is impossible to tell from this method's return value. @param id name of the tag object. @return reference to the tag object. Never null.
lookupTag
java
theonedev/onedev
server-core/src/main/java/org/eclipse/jgit/revwalk/RevWalk.java
https://github.com/theonedev/onedev/blob/master/server-core/src/main/java/org/eclipse/jgit/revwalk/RevWalk.java
MIT
@NonNull public RevObject lookupAny(AnyObjectId id, int type) { RevObject r = objects.get(id); if (r == null) { switch (type) { case Constants.OBJ_COMMIT: r = createCommit(id); break; case Constants.OBJ_TREE: r = new RevTree(id); break; case Constants.OBJ_BLOB: r = new RevBlob(id); ...
Locate a reference to any object without loading it. <p> The object may or may not exist in the repository. It is impossible to tell from this method's return value. @param id name of the object. @param type type of the object. Must be a valid Git object type. @return reference to the object. Nev...
lookupAny
java
theonedev/onedev
server-core/src/main/java/org/eclipse/jgit/revwalk/RevWalk.java
https://github.com/theonedev/onedev/blob/master/server-core/src/main/java/org/eclipse/jgit/revwalk/RevWalk.java
MIT
public RevObject lookupOrNull(AnyObjectId id) { return objects.get(id); }
Locate an object that was previously allocated in this walk. @param id name of the object. @return reference to the object if it has been previously located; otherwise null.
lookupOrNull
java
theonedev/onedev
server-core/src/main/java/org/eclipse/jgit/revwalk/RevWalk.java
https://github.com/theonedev/onedev/blob/master/server-core/src/main/java/org/eclipse/jgit/revwalk/RevWalk.java
MIT
@NonNull public RevTag parseTag(AnyObjectId id) throws MissingObjectException, IncorrectObjectTypeException, IOException { RevObject c = parseAny(id); if (!(c instanceof RevTag)) throw new IncorrectObjectTypeException(id.toObjectId(), Constants.TYPE_TAG); return (RevTag) c; }
Locate a reference to an annotated tag and immediately parse its content. <p> Unlike {@link #lookupTag(AnyObjectId)} this method only returns successfully if the tag object exists, is verified to be a tag, and was parsed without error. @param id name of the tag object. @return reference to the tag object. N...
parseTag
java
theonedev/onedev
server-core/src/main/java/org/eclipse/jgit/revwalk/RevWalk.java
https://github.com/theonedev/onedev/blob/master/server-core/src/main/java/org/eclipse/jgit/revwalk/RevWalk.java
MIT
@NonNull public RevObject parseAny(AnyObjectId id) throws MissingObjectException, IOException { RevObject r = objects.get(id); if (r == null) r = parseNew(id, reader.open(id)); else parseHeaders(r); return r; }
Locate a reference to any object and immediately parse its headers. <p> This method only returns successfully if the object exists and was parsed without error. Parsing an object can be expensive as the type must be determined. For blobs this may mean the blob content was unpacked unnecessarily, and thrown away. @para...
parseAny
java
theonedev/onedev
server-core/src/main/java/org/eclipse/jgit/revwalk/RevWalk.java
https://github.com/theonedev/onedev/blob/master/server-core/src/main/java/org/eclipse/jgit/revwalk/RevWalk.java
MIT
private RevObject parseNew(AnyObjectId id, ObjectLoader ldr) throws LargeObjectException, CorruptObjectException, MissingObjectException, IOException { RevObject r; int type = ldr.getType(); switch (type) { case Constants.OBJ_COMMIT: { final RevCommit c = createCommit(id); c.parseCanonical(this, get...
Locate a reference to any object and immediately parse its headers. <p> This method only returns successfully if the object exists and was parsed without error. Parsing an object can be expensive as the type must be determined. For blobs this may mean the blob content was unpacked unnecessarily, and thrown away. @para...
parseNew
java
theonedev/onedev
server-core/src/main/java/org/eclipse/jgit/revwalk/RevWalk.java
https://github.com/theonedev/onedev/blob/master/server-core/src/main/java/org/eclipse/jgit/revwalk/RevWalk.java
MIT
byte[] getCachedBytes(RevObject obj) throws LargeObjectException, MissingObjectException, IncorrectObjectTypeException, IOException { return getCachedBytes(obj, reader.open(obj, obj.getType())); }
Locate a reference to any object and immediately parse its headers. <p> This method only returns successfully if the object exists and was parsed without error. Parsing an object can be expensive as the type must be determined. For blobs this may mean the blob content was unpacked unnecessarily, and thrown away. @para...
getCachedBytes
java
theonedev/onedev
server-core/src/main/java/org/eclipse/jgit/revwalk/RevWalk.java
https://github.com/theonedev/onedev/blob/master/server-core/src/main/java/org/eclipse/jgit/revwalk/RevWalk.java
MIT
byte[] getCachedBytes(RevObject obj, ObjectLoader ldr) throws LargeObjectException, MissingObjectException, IOException { try { return ldr.getCachedBytes(5 * MB); } catch (LargeObjectException tooBig) { tooBig.setObjectId(obj); throw tooBig; } }
Locate a reference to any object and immediately parse its headers. <p> This method only returns successfully if the object exists and was parsed without error. Parsing an object can be expensive as the type must be determined. For blobs this may mean the blob content was unpacked unnecessarily, and thrown away. @para...
getCachedBytes
java
theonedev/onedev
server-core/src/main/java/org/eclipse/jgit/revwalk/RevWalk.java
https://github.com/theonedev/onedev/blob/master/server-core/src/main/java/org/eclipse/jgit/revwalk/RevWalk.java
MIT
public <T extends ObjectId> AsyncRevObjectQueue parseAny( Iterable<T> objectIds, boolean reportMissing) { List<T> need = new ArrayList<>(); List<RevObject> have = new ArrayList<>(); for (T id : objectIds) { RevObject r = objects.get(id); if (r != null && (r.flags & PARSED) != 0) have.add(r); else ...
Asynchronous object parsing. @param objectIds objects to open from the object store. The supplied collection must not be modified until the queue has finished. @param reportMissing if true missing objects are reported by calling failure with a MissingObjectException. This ma...
parseAny
java
theonedev/onedev
server-core/src/main/java/org/eclipse/jgit/revwalk/RevWalk.java
https://github.com/theonedev/onedev/blob/master/server-core/src/main/java/org/eclipse/jgit/revwalk/RevWalk.java
MIT
@Override public RevObject next() { return objItr.hasNext() ? objItr.next() : null; }
Asynchronous object parsing. @param objectIds objects to open from the object store. The supplied collection must not be modified until the queue has finished. @param reportMissing if true missing objects are reported by calling failure with a MissingObjectException. This ma...
next
java
theonedev/onedev
server-core/src/main/java/org/eclipse/jgit/revwalk/RevWalk.java
https://github.com/theonedev/onedev/blob/master/server-core/src/main/java/org/eclipse/jgit/revwalk/RevWalk.java
MIT
@Override public boolean cancel(boolean mayInterruptIfRunning) { return true; }
Asynchronous object parsing. @param objectIds objects to open from the object store. The supplied collection must not be modified until the queue has finished. @param reportMissing if true missing objects are reported by calling failure with a MissingObjectException. This ma...
cancel
java
theonedev/onedev
server-core/src/main/java/org/eclipse/jgit/revwalk/RevWalk.java
https://github.com/theonedev/onedev/blob/master/server-core/src/main/java/org/eclipse/jgit/revwalk/RevWalk.java
MIT
@Override public void release() { // In-memory only, no action required. }
Asynchronous object parsing. @param objectIds objects to open from the object store. The supplied collection must not be modified until the queue has finished. @param reportMissing if true missing objects are reported by calling failure with a MissingObjectException. This ma...
release
java
theonedev/onedev
server-core/src/main/java/org/eclipse/jgit/revwalk/RevWalk.java
https://github.com/theonedev/onedev/blob/master/server-core/src/main/java/org/eclipse/jgit/revwalk/RevWalk.java
MIT
@Override public RevObject next() throws MissingObjectException, IncorrectObjectTypeException, IOException { if (objItr.hasNext()) return objItr.next(); if (!lItr.next()) return null; ObjectId id = lItr.getObjectId(); ObjectLoader ldr = lItr.open(); RevObject r = objects.get(id); ...
Asynchronous object parsing. @param objectIds objects to open from the object store. The supplied collection must not be modified until the queue has finished. @param reportMissing if true missing objects are reported by calling failure with a MissingObjectException. This ma...
next
java
theonedev/onedev
server-core/src/main/java/org/eclipse/jgit/revwalk/RevWalk.java
https://github.com/theonedev/onedev/blob/master/server-core/src/main/java/org/eclipse/jgit/revwalk/RevWalk.java
MIT
@Override public boolean cancel(boolean mayInterruptIfRunning) { return lItr.cancel(mayInterruptIfRunning); }
Asynchronous object parsing. @param objectIds objects to open from the object store. The supplied collection must not be modified until the queue has finished. @param reportMissing if true missing objects are reported by calling failure with a MissingObjectException. This ma...
cancel
java
theonedev/onedev
server-core/src/main/java/org/eclipse/jgit/revwalk/RevWalk.java
https://github.com/theonedev/onedev/blob/master/server-core/src/main/java/org/eclipse/jgit/revwalk/RevWalk.java
MIT
@Override public void release() { lItr.release(); }
Asynchronous object parsing. @param objectIds objects to open from the object store. The supplied collection must not be modified until the queue has finished. @param reportMissing if true missing objects are reported by calling failure with a MissingObjectException. This ma...
release
java
theonedev/onedev
server-core/src/main/java/org/eclipse/jgit/revwalk/RevWalk.java
https://github.com/theonedev/onedev/blob/master/server-core/src/main/java/org/eclipse/jgit/revwalk/RevWalk.java
MIT
public void parseHeaders(RevObject obj) throws MissingObjectException, IOException { if ((obj.flags & PARSED) == 0) obj.parseHeaders(this); }
Ensure the object's critical headers have been parsed. <p> This method only returns successfully if the object exists and was parsed without error. @param obj the object the caller needs to be parsed. @throws org.eclipse.jgit.errors.MissingObjectException the supplied does not exist. @throws jav...
parseHeaders
java
theonedev/onedev
server-core/src/main/java/org/eclipse/jgit/revwalk/RevWalk.java
https://github.com/theonedev/onedev/blob/master/server-core/src/main/java/org/eclipse/jgit/revwalk/RevWalk.java
MIT
public void parseBody(RevObject obj) throws MissingObjectException, IOException { obj.parseBody(this); }
Ensure the object's full body content is available. <p> This method only returns successfully if the object exists and was parsed without error. @param obj the object the caller needs to be parsed. @throws org.eclipse.jgit.errors.MissingObjectException the supplied does not exist. @throws java.i...
parseBody
java
theonedev/onedev
server-core/src/main/java/org/eclipse/jgit/revwalk/RevWalk.java
https://github.com/theonedev/onedev/blob/master/server-core/src/main/java/org/eclipse/jgit/revwalk/RevWalk.java
MIT
public RevObject peel(RevObject obj) throws MissingObjectException, IOException { while (obj instanceof RevTag) { parseHeaders(obj); obj = ((RevTag) obj).getObject(); } parseHeaders(obj); return obj; }
Peel back annotated tags until a non-tag object is found. @param obj the starting object. @return If {@code obj} is not an annotated tag, {@code obj}. Otherwise the first non-tag object that {@code obj} references. The returned object's headers have been parsed. @throws org.eclipse.jgit.erro...
peel
java
theonedev/onedev
server-core/src/main/java/org/eclipse/jgit/revwalk/RevWalk.java
https://github.com/theonedev/onedev/blob/master/server-core/src/main/java/org/eclipse/jgit/revwalk/RevWalk.java
MIT
public RevFlag newFlag(String name) { final int m = allocFlag(); return new RevFlag(this, name, m); }
Create a new flag for application use during walking. <p> Applications are only assured to be able to create 24 unique flags on any given revision walker instance. Any flags beyond 24 are offered only if the implementation has extra free space within its internal storage. @param name description of the flag...
newFlag
java
theonedev/onedev
server-core/src/main/java/org/eclipse/jgit/revwalk/RevWalk.java
https://github.com/theonedev/onedev/blob/master/server-core/src/main/java/org/eclipse/jgit/revwalk/RevWalk.java
MIT
int allocFlag() { if (freeFlags == 0) throw new IllegalArgumentException(MessageFormat.format( JGitText.get().flagsAlreadyCreated, Integer.valueOf(32 - RESERVED_FLAGS))); final int m = Integer.lowestOneBit(freeFlags); freeFlags &= ~m; return m; }
Create a new flag for application use during walking. <p> Applications are only assured to be able to create 24 unique flags on any given revision walker instance. Any flags beyond 24 are offered only if the implementation has extra free space within its internal storage. @param name description of the flag...
allocFlag
java
theonedev/onedev
server-core/src/main/java/org/eclipse/jgit/revwalk/RevWalk.java
https://github.com/theonedev/onedev/blob/master/server-core/src/main/java/org/eclipse/jgit/revwalk/RevWalk.java
MIT
public final void retainOnReset(RevFlag flag) { if ((freeFlags & flag.mask) != 0) throw new IllegalArgumentException(MessageFormat.format(JGitText.get().flagIsDisposed, flag.name)); if (flag.walker != this) throw new IllegalArgumentException(MessageFormat.format(JGitText.get().flagNotFromThis, flag.name)); ...
Preserve a RevFlag during all {@code reset} methods. <p> Calling {@code retainOnReset(flag)} avoids needing to pass the flag during each {@code resetRetain()} invocation on this instance. <p> Clearing flags marked retainOnReset requires disposing of the flag with {@code #disposeFlag(RevFlag)} or disposing of the entire...
retainOnReset
java
theonedev/onedev
server-core/src/main/java/org/eclipse/jgit/revwalk/RevWalk.java
https://github.com/theonedev/onedev/blob/master/server-core/src/main/java/org/eclipse/jgit/revwalk/RevWalk.java
MIT
public final void retainOnReset(Collection<RevFlag> flags) { for (RevFlag f : flags) retainOnReset(f); }
Preserve a set of RevFlags during all {@code reset} methods. <p> Calling {@code retainOnReset(set)} avoids needing to pass the flags during each {@code resetRetain()} invocation on this instance. <p> Clearing flags marked retainOnReset requires disposing of the flag with {@code #disposeFlag(RevFlag)} or disposing of th...
retainOnReset
java
theonedev/onedev
server-core/src/main/java/org/eclipse/jgit/revwalk/RevWalk.java
https://github.com/theonedev/onedev/blob/master/server-core/src/main/java/org/eclipse/jgit/revwalk/RevWalk.java
MIT
void freeFlag(int mask) { retainOnReset &= ~mask; if (isNotStarted()) { freeFlags |= mask; carryFlags &= ~mask; } else { delayFreeFlags |= mask; } }
Allow a flag to be recycled for a different use. <p> Recycled flags always come back as a different Java object instance when assigned again by {@link #newFlag(String)}. <p> If the flag was previously being carried, the carrying request is removed. Disposing of a carried flag while a traversal is in progress has an und...
freeFlag
java
theonedev/onedev
server-core/src/main/java/org/eclipse/jgit/revwalk/RevWalk.java
https://github.com/theonedev/onedev/blob/master/server-core/src/main/java/org/eclipse/jgit/revwalk/RevWalk.java
MIT
private void finishDelayedFreeFlags() { if (delayFreeFlags != 0) { freeFlags |= delayFreeFlags; carryFlags &= ~delayFreeFlags; delayFreeFlags = 0; } }
Allow a flag to be recycled for a different use. <p> Recycled flags always come back as a different Java object instance when assigned again by {@link #newFlag(String)}. <p> If the flag was previously being carried, the carrying request is removed. Disposing of a carried flag while a traversal is in progress has an und...
finishDelayedFreeFlags
java
theonedev/onedev
server-core/src/main/java/org/eclipse/jgit/revwalk/RevWalk.java
https://github.com/theonedev/onedev/blob/master/server-core/src/main/java/org/eclipse/jgit/revwalk/RevWalk.java
MIT
protected void assertNotStarted() { if (isNotStarted()) return; throw new IllegalStateException(JGitText.get().outputHasAlreadyBeenStarted); }
Throws an exception if we have started producing output.
assertNotStarted
java
theonedev/onedev
server-core/src/main/java/org/eclipse/jgit/revwalk/RevWalk.java
https://github.com/theonedev/onedev/blob/master/server-core/src/main/java/org/eclipse/jgit/revwalk/RevWalk.java
MIT
public ObjectWalk toObjectWalkWithSameObjects() { ObjectWalk ow = new ObjectWalk(reader); RevWalk rw = ow; rw.objects = objects; rw.freeFlags = freeFlags; return ow; }
Create and return an {@link org.eclipse.jgit.revwalk.ObjectWalk} using the same objects. <p> Prior to using this method, the caller must reset this RevWalk to clean any flags that were used during the last traversal. <p> The returned ObjectWalk uses the same ObjectReader, internal object pool, and free RevFlags. Once t...
toObjectWalkWithSameObjects
java
theonedev/onedev
server-core/src/main/java/org/eclipse/jgit/revwalk/RevWalk.java
https://github.com/theonedev/onedev/blob/master/server-core/src/main/java/org/eclipse/jgit/revwalk/RevWalk.java
MIT
public static RevFilter create(RevFilter a, RevFilter b) { if (a == ALL) return b; if (b == ALL) return a; return new Binary(a, b); }
Create a filter with two filters, both of which must match. @param a first filter to test. @param b second filter to test. @return a filter that must match both input filters.
create
java
theonedev/onedev
server-core/src/main/java/org/eclipse/jgit/revwalk/filter/AndRevFilter.java
https://github.com/theonedev/onedev/blob/master/server-core/src/main/java/org/eclipse/jgit/revwalk/filter/AndRevFilter.java
MIT
public static RevFilter create(RevFilter[] list) { if (list.length == 2) return create(list[0], list[1]); if (list.length < 2) throw new IllegalArgumentException(JGitText.get().atLeastTwoFiltersNeeded); final RevFilter[] subfilters = new RevFilter[list.length]; System.arraycopy(list, 0, subfilters, 0, lis...
Create a filter around many filters, all of which must match. @param list list of filters to match against. Must contain at least 2 filters. @return a filter that must match all input filters.
create
java
theonedev/onedev
server-core/src/main/java/org/eclipse/jgit/revwalk/filter/AndRevFilter.java
https://github.com/theonedev/onedev/blob/master/server-core/src/main/java/org/eclipse/jgit/revwalk/filter/AndRevFilter.java
MIT
public static RevFilter create(Collection<RevFilter> list) { if (list.size() < 2) throw new IllegalArgumentException(JGitText.get().atLeastTwoFiltersNeeded); final RevFilter[] subfilters = new RevFilter[list.size()]; list.toArray(subfilters); if (subfilters.length == 2) return create(subfilters[0], subfil...
Create a filter around many filters, all of which must match. @param list list of filters to match against. Must contain at least 2 filters. @return a filter that must match all input filters.
create
java
theonedev/onedev
server-core/src/main/java/org/eclipse/jgit/revwalk/filter/AndRevFilter.java
https://github.com/theonedev/onedev/blob/master/server-core/src/main/java/org/eclipse/jgit/revwalk/filter/AndRevFilter.java
MIT
@Override public boolean include(RevWalk walker, RevCommit c) throws MissingObjectException, IncorrectObjectTypeException, IOException { return a.include(walker, c) && b.include(walker, c); }
Create a filter around many filters, all of which must match. @param list list of filters to match against. Must contain at least 2 filters. @return a filter that must match all input filters.
include
java
theonedev/onedev
server-core/src/main/java/org/eclipse/jgit/revwalk/filter/AndRevFilter.java
https://github.com/theonedev/onedev/blob/master/server-core/src/main/java/org/eclipse/jgit/revwalk/filter/AndRevFilter.java
MIT
@Override public boolean requiresCommitBody() { return requiresCommitBody; }
Create a filter around many filters, all of which must match. @param list list of filters to match against. Must contain at least 2 filters. @return a filter that must match all input filters.
requiresCommitBody
java
theonedev/onedev
server-core/src/main/java/org/eclipse/jgit/revwalk/filter/AndRevFilter.java
https://github.com/theonedev/onedev/blob/master/server-core/src/main/java/org/eclipse/jgit/revwalk/filter/AndRevFilter.java
MIT
@Override public RevFilter clone() { return new Binary(a.clone(), b.clone()); }
Create a filter around many filters, all of which must match. @param list list of filters to match against. Must contain at least 2 filters. @return a filter that must match all input filters.
clone
java
theonedev/onedev
server-core/src/main/java/org/eclipse/jgit/revwalk/filter/AndRevFilter.java
https://github.com/theonedev/onedev/blob/master/server-core/src/main/java/org/eclipse/jgit/revwalk/filter/AndRevFilter.java
MIT
@Override public String toString() { return "(" + a.toString() + " AND " + b.toString() + ")"; //$NON-NLS-1$ }
Create a filter around many filters, all of which must match. @param list list of filters to match against. Must contain at least 2 filters. @return a filter that must match all input filters.
toString
java
theonedev/onedev
server-core/src/main/java/org/eclipse/jgit/revwalk/filter/AndRevFilter.java
https://github.com/theonedev/onedev/blob/master/server-core/src/main/java/org/eclipse/jgit/revwalk/filter/AndRevFilter.java
MIT
@Override public boolean include(RevWalk walker, RevCommit c) throws MissingObjectException, IncorrectObjectTypeException, IOException { for (RevFilter f : subfilters) { if (!f.include(walker, c)) return false; } return true; }
Create a filter around many filters, all of which must match. @param list list of filters to match against. Must contain at least 2 filters. @return a filter that must match all input filters.
include
java
theonedev/onedev
server-core/src/main/java/org/eclipse/jgit/revwalk/filter/AndRevFilter.java
https://github.com/theonedev/onedev/blob/master/server-core/src/main/java/org/eclipse/jgit/revwalk/filter/AndRevFilter.java
MIT
@Override public boolean requiresCommitBody() { return requiresCommitBody; }
Create a filter around many filters, all of which must match. @param list list of filters to match against. Must contain at least 2 filters. @return a filter that must match all input filters.
requiresCommitBody
java
theonedev/onedev
server-core/src/main/java/org/eclipse/jgit/revwalk/filter/AndRevFilter.java
https://github.com/theonedev/onedev/blob/master/server-core/src/main/java/org/eclipse/jgit/revwalk/filter/AndRevFilter.java
MIT
@Override public RevFilter clone() { final RevFilter[] s = new RevFilter[subfilters.length]; for (int i = 0; i < s.length; i++) s[i] = subfilters[i].clone(); return new List(s); }
Create a filter around many filters, all of which must match. @param list list of filters to match against. Must contain at least 2 filters. @return a filter that must match all input filters.
clone
java
theonedev/onedev
server-core/src/main/java/org/eclipse/jgit/revwalk/filter/AndRevFilter.java
https://github.com/theonedev/onedev/blob/master/server-core/src/main/java/org/eclipse/jgit/revwalk/filter/AndRevFilter.java
MIT
@Override public String toString() { final StringBuilder r = new StringBuilder(); r.append("("); for (int i = 0; i < subfilters.length; i++) { if (i > 0) r.append(" AND "); r.append(subfilters[i].toString()); } r.append(")"); return r.toString(); }
Create a filter around many filters, all of which must match. @param list list of filters to match against. Must contain at least 2 filters. @return a filter that must match all input filters.
toString
java
theonedev/onedev
server-core/src/main/java/org/eclipse/jgit/revwalk/filter/AndRevFilter.java
https://github.com/theonedev/onedev/blob/master/server-core/src/main/java/org/eclipse/jgit/revwalk/filter/AndRevFilter.java
MIT
public static RevFilter create(RevFilter a) { return new NotRevFilter(a); }
Create a filter that negates the result of another filter. @param a filter to negate. @return a filter that does the reverse of <code>a</code>.
create
java
theonedev/onedev
server-core/src/main/java/org/eclipse/jgit/revwalk/filter/NotRevFilter.java
https://github.com/theonedev/onedev/blob/master/server-core/src/main/java/org/eclipse/jgit/revwalk/filter/NotRevFilter.java
MIT
@Override public boolean include(ObjectWalk walker, AnyObjectId o) { return true; }
Default filter that always returns true.
include
java
theonedev/onedev
server-core/src/main/java/org/eclipse/jgit/revwalk/filter/ObjectFilter.java
https://github.com/theonedev/onedev/blob/master/server-core/src/main/java/org/eclipse/jgit/revwalk/filter/ObjectFilter.java
MIT
public static RevFilter create(RevFilter a, RevFilter b) { if (a == ALL || b == ALL) return ALL; return new Binary(a, b); }
Create a filter with two filters, one of which must match. @param a first filter to test. @param b second filter to test. @return a filter that must match at least one input filter.
create
java
theonedev/onedev
server-core/src/main/java/org/eclipse/jgit/revwalk/filter/OrRevFilter.java
https://github.com/theonedev/onedev/blob/master/server-core/src/main/java/org/eclipse/jgit/revwalk/filter/OrRevFilter.java
MIT
public static RevFilter create(RevFilter[] list) { if (list.length == 2) return create(list[0], list[1]); if (list.length < 2) throw new IllegalArgumentException(JGitText.get().atLeastTwoFiltersNeeded); final RevFilter[] subfilters = new RevFilter[list.length]; System.arraycopy(list, 0, subfilters, 0, lis...
Create a filter around many filters, one of which must match. @param list list of filters to match against. Must contain at least 2 filters. @return a filter that must match at least one input filter.
create
java
theonedev/onedev
server-core/src/main/java/org/eclipse/jgit/revwalk/filter/OrRevFilter.java
https://github.com/theonedev/onedev/blob/master/server-core/src/main/java/org/eclipse/jgit/revwalk/filter/OrRevFilter.java
MIT
public static RevFilter create(Collection<RevFilter> list) { if (list.size() < 2) throw new IllegalArgumentException(JGitText.get().atLeastTwoFiltersNeeded); final RevFilter[] subfilters = new RevFilter[list.size()]; list.toArray(subfilters); if (subfilters.length == 2) return create(subfilters[0], subfil...
Create a filter around many filters, one of which must match. @param list list of filters to match against. Must contain at least 2 filters. @return a filter that must match at least one input filter.
create
java
theonedev/onedev
server-core/src/main/java/org/eclipse/jgit/revwalk/filter/OrRevFilter.java
https://github.com/theonedev/onedev/blob/master/server-core/src/main/java/org/eclipse/jgit/revwalk/filter/OrRevFilter.java
MIT
@Override public boolean include(RevWalk walker, RevCommit c) throws MissingObjectException, IncorrectObjectTypeException, IOException { return a.include(walker, c) || b.include(walker, c); }
Create a filter around many filters, one of which must match. @param list list of filters to match against. Must contain at least 2 filters. @return a filter that must match at least one input filter.
include
java
theonedev/onedev
server-core/src/main/java/org/eclipse/jgit/revwalk/filter/OrRevFilter.java
https://github.com/theonedev/onedev/blob/master/server-core/src/main/java/org/eclipse/jgit/revwalk/filter/OrRevFilter.java
MIT
@Override public boolean requiresCommitBody() { return requiresCommitBody; }
Create a filter around many filters, one of which must match. @param list list of filters to match against. Must contain at least 2 filters. @return a filter that must match at least one input filter.
requiresCommitBody
java
theonedev/onedev
server-core/src/main/java/org/eclipse/jgit/revwalk/filter/OrRevFilter.java
https://github.com/theonedev/onedev/blob/master/server-core/src/main/java/org/eclipse/jgit/revwalk/filter/OrRevFilter.java
MIT
@Override public RevFilter clone() { return new Binary(a.clone(), b.clone()); }
Create a filter around many filters, one of which must match. @param list list of filters to match against. Must contain at least 2 filters. @return a filter that must match at least one input filter.
clone
java
theonedev/onedev
server-core/src/main/java/org/eclipse/jgit/revwalk/filter/OrRevFilter.java
https://github.com/theonedev/onedev/blob/master/server-core/src/main/java/org/eclipse/jgit/revwalk/filter/OrRevFilter.java
MIT
@Override public String toString() { return "(" + a.toString() + " OR " + b.toString() + ")"; }
Create a filter around many filters, one of which must match. @param list list of filters to match against. Must contain at least 2 filters. @return a filter that must match at least one input filter.
toString
java
theonedev/onedev
server-core/src/main/java/org/eclipse/jgit/revwalk/filter/OrRevFilter.java
https://github.com/theonedev/onedev/blob/master/server-core/src/main/java/org/eclipse/jgit/revwalk/filter/OrRevFilter.java
MIT
@Override public boolean include(RevWalk walker, RevCommit c) throws MissingObjectException, IncorrectObjectTypeException, IOException { for (RevFilter f : subfilters) { if (f.include(walker, c)) return true; } return false; }
Create a filter around many filters, one of which must match. @param list list of filters to match against. Must contain at least 2 filters. @return a filter that must match at least one input filter.
include
java
theonedev/onedev
server-core/src/main/java/org/eclipse/jgit/revwalk/filter/OrRevFilter.java
https://github.com/theonedev/onedev/blob/master/server-core/src/main/java/org/eclipse/jgit/revwalk/filter/OrRevFilter.java
MIT
@Override public boolean requiresCommitBody() { return requiresCommitBody; }
Create a filter around many filters, one of which must match. @param list list of filters to match against. Must contain at least 2 filters. @return a filter that must match at least one input filter.
requiresCommitBody
java
theonedev/onedev
server-core/src/main/java/org/eclipse/jgit/revwalk/filter/OrRevFilter.java
https://github.com/theonedev/onedev/blob/master/server-core/src/main/java/org/eclipse/jgit/revwalk/filter/OrRevFilter.java
MIT
@Override public RevFilter clone() { final RevFilter[] s = new RevFilter[subfilters.length]; for (int i = 0; i < s.length; i++) s[i] = subfilters[i].clone(); return new List(s); }
Create a filter around many filters, one of which must match. @param list list of filters to match against. Must contain at least 2 filters. @return a filter that must match at least one input filter.
clone
java
theonedev/onedev
server-core/src/main/java/org/eclipse/jgit/revwalk/filter/OrRevFilter.java
https://github.com/theonedev/onedev/blob/master/server-core/src/main/java/org/eclipse/jgit/revwalk/filter/OrRevFilter.java
MIT
@Override public String toString() { final StringBuilder r = new StringBuilder(); r.append("("); //$NON-NLS-1$ for (int i = 0; i < subfilters.length; i++) { if (i > 0) r.append(" OR "); //$NON-NLS-1$ r.append(subfilters[i].toString()); } r.append(")"); //$NON-NLS-1$ return r.toString();...
Create a filter around many filters, one of which must match. @param list list of filters to match against. Must contain at least 2 filters. @return a filter that must match at least one input filter.
toString
java
theonedev/onedev
server-core/src/main/java/org/eclipse/jgit/revwalk/filter/OrRevFilter.java
https://github.com/theonedev/onedev/blob/master/server-core/src/main/java/org/eclipse/jgit/revwalk/filter/OrRevFilter.java
MIT
public String pattern() { return patternText; }
Get the pattern this filter uses. @return the pattern this filter is applying to candidate strings.
pattern
java
theonedev/onedev
server-core/src/main/java/org/eclipse/jgit/revwalk/filter/PatternMatchRevFilter.java
https://github.com/theonedev/onedev/blob/master/server-core/src/main/java/org/eclipse/jgit/revwalk/filter/PatternMatchRevFilter.java
MIT
@Override public boolean include(RevWalk walker, RevCommit c) { return true; }
Default filter that always returns true (thread safe).
include
java
theonedev/onedev
server-core/src/main/java/org/eclipse/jgit/revwalk/filter/RevFilter.java
https://github.com/theonedev/onedev/blob/master/server-core/src/main/java/org/eclipse/jgit/revwalk/filter/RevFilter.java
MIT
@Override public RevFilter clone() { return this; }
Default filter that always returns true (thread safe).
clone
java
theonedev/onedev
server-core/src/main/java/org/eclipse/jgit/revwalk/filter/RevFilter.java
https://github.com/theonedev/onedev/blob/master/server-core/src/main/java/org/eclipse/jgit/revwalk/filter/RevFilter.java
MIT
@Override public boolean requiresCommitBody() { return false; }
Default filter that always returns true (thread safe).
requiresCommitBody
java
theonedev/onedev
server-core/src/main/java/org/eclipse/jgit/revwalk/filter/RevFilter.java
https://github.com/theonedev/onedev/blob/master/server-core/src/main/java/org/eclipse/jgit/revwalk/filter/RevFilter.java
MIT
@Override public String toString() { return "ALL"; //$NON-NLS-1$ }
Default filter that always returns true (thread safe).
toString
java
theonedev/onedev
server-core/src/main/java/org/eclipse/jgit/revwalk/filter/RevFilter.java
https://github.com/theonedev/onedev/blob/master/server-core/src/main/java/org/eclipse/jgit/revwalk/filter/RevFilter.java
MIT
@Override public boolean include(RevWalk walker, RevCommit c) { return false; }
Default filter that always returns false (thread safe).
include
java
theonedev/onedev
server-core/src/main/java/org/eclipse/jgit/revwalk/filter/RevFilter.java
https://github.com/theonedev/onedev/blob/master/server-core/src/main/java/org/eclipse/jgit/revwalk/filter/RevFilter.java
MIT
@Override public RevFilter clone() { return this; }
Default filter that always returns false (thread safe).
clone
java
theonedev/onedev
server-core/src/main/java/org/eclipse/jgit/revwalk/filter/RevFilter.java
https://github.com/theonedev/onedev/blob/master/server-core/src/main/java/org/eclipse/jgit/revwalk/filter/RevFilter.java
MIT
@Override public boolean requiresCommitBody() { return false; }
Default filter that always returns false (thread safe).
requiresCommitBody
java
theonedev/onedev
server-core/src/main/java/org/eclipse/jgit/revwalk/filter/RevFilter.java
https://github.com/theonedev/onedev/blob/master/server-core/src/main/java/org/eclipse/jgit/revwalk/filter/RevFilter.java
MIT
@Override public String toString() { return "NONE"; //$NON-NLS-1$ }
Default filter that always returns false (thread safe).
toString
java
theonedev/onedev
server-core/src/main/java/org/eclipse/jgit/revwalk/filter/RevFilter.java
https://github.com/theonedev/onedev/blob/master/server-core/src/main/java/org/eclipse/jgit/revwalk/filter/RevFilter.java
MIT
public static boolean safe(String pattern) { for (int i = 0; i < pattern.length(); i++) { final char c = pattern.charAt(i); switch (c) { case '.': case '?': case '*': case '+': case '{': case '}': case '(': case ')': case '[': case ']': case '\\': return false; } } re...
Can this string be safely handled by a substring filter? @param pattern the pattern text proposed by the user. @return true if a substring filter can perform this pattern match; false if {@link org.eclipse.jgit.revwalk.filter.PatternMatchRevFilter} must be used instead.
safe
java
theonedev/onedev
server-core/src/main/java/org/eclipse/jgit/revwalk/filter/SubStringRevFilter.java
https://github.com/theonedev/onedev/blob/master/server-core/src/main/java/org/eclipse/jgit/revwalk/filter/SubStringRevFilter.java
MIT
@Override public boolean supports(Class<?> type) { return MediaType.class.isAssignableFrom(type); }
Header delegate provider for MediaType. @author Marc Hadley @author Marek Potociar @author Martin Matula
supports
java
theonedev/onedev
server-core/src/main/java/org/glassfish/jersey/message/internal/MediaTypeProvider.java
https://github.com/theonedev/onedev/blob/master/server-core/src/main/java/org/glassfish/jersey/message/internal/MediaTypeProvider.java
MIT
@Override public String toString(MediaType header) { throwIllegalArgumentExceptionIfNull(header, MEDIA_TYPE_IS_NULL); StringBuilder b = new StringBuilder(); b.append(header.getType()).append('/').append(header.getSubtype()); for (Map.Entry<String, String> e : header.getParameters()...
Header delegate provider for MediaType. @author Marc Hadley @author Marek Potociar @author Martin Matula
toString
java
theonedev/onedev
server-core/src/main/java/org/glassfish/jersey/message/internal/MediaTypeProvider.java
https://github.com/theonedev/onedev/blob/master/server-core/src/main/java/org/glassfish/jersey/message/internal/MediaTypeProvider.java
MIT
@Override public MediaType fromString(String header) { throwIllegalArgumentExceptionIfNull(header, MEDIA_TYPE_IS_NULL); var commaIndex = header.indexOf(','); if (commaIndex != -1) { var colonIndex = header.indexOf(';', commaIndex); if (colonIndex != -1) header = header.substring(0, commaInde...
Header delegate provider for MediaType. @author Marc Hadley @author Marek Potociar @author Martin Matula
fromString
java
theonedev/onedev
server-core/src/main/java/org/glassfish/jersey/message/internal/MediaTypeProvider.java
https://github.com/theonedev/onedev/blob/master/server-core/src/main/java/org/glassfish/jersey/message/internal/MediaTypeProvider.java
MIT
public static MediaType valueOf(HttpHeaderReader reader) throws ParseException { // Skip any white space reader.hasNext(); // Get the type final String type = reader.nextToken().toString(); reader.nextSeparator('/'); // Get the subtype final String subType = read...
Create a new {@link javax.ws.rs.core.MediaType} instance from a header reader. @param reader header reader. @return new {@code MediaType} instance. @throws ParseException in case of a header parsing error.
valueOf
java
theonedev/onedev
server-core/src/main/java/org/glassfish/jersey/message/internal/MediaTypeProvider.java
https://github.com/theonedev/onedev/blob/master/server-core/src/main/java/org/glassfish/jersey/message/internal/MediaTypeProvider.java
MIT
public static Object[] getParameterValues(List<ParamValueFactoryWithSource<?>> valueProviders, ContainerRequest request) { final Object[] params = new Object[valueProviders.size()]; EntityDeserializer.pushParams(params); try { int entityProviderIndex = -1; int index = 0; ...
Get the array of parameter values. @param valueProviders a list of value providers. @return array of parameter values provided by the value providers.
getParameterValues
java
theonedev/onedev
server-core/src/main/java/org/glassfish/jersey/server/spi/internal/ParameterValueHelper.java
https://github.com/theonedev/onedev/blob/master/server-core/src/main/java/org/glassfish/jersey/server/spi/internal/ParameterValueHelper.java
MIT
public static long next() { // Fix issue #711 - After update to v7.x CPU is loaded on 100% /* while ( true ) { long base = System.currentTimeMillis() << BIN_DIGITS; long maxValue = base + ONE_MS - 1; for ( long current = VALUE.get(), update = Math.max( base, current + 1 ); update < maxValue; curren...
Generates increasing identifiers (in a single VM only). Not valid across multiple VMs. Identifiers are not necessarily strictly increasing, but usually are. <p/> Core while loop implemented by Alex Snaps - EHCache project - under ASL 2.0 @author Hibernate team @author Alex Snaps
next
java
theonedev/onedev
server-core/src/main/java/org/hibernate/cache/spi/support/SimpleTimestamper.java
https://github.com/theonedev/onedev/blob/master/server-core/src/main/java/org/hibernate/cache/spi/support/SimpleTimestamper.java
MIT
public static int timeOut() { return (int) TimeUnit.SECONDS.toMillis( 60 ) * ONE_MS; }
Generates increasing identifiers (in a single VM only). Not valid across multiple VMs. Identifiers are not necessarily strictly increasing, but usually are. <p/> Core while loop implemented by Alex Snaps - EHCache project - under ASL 2.0 @author Hibernate team @author Alex Snaps
timeOut
java
theonedev/onedev
server-core/src/main/java/org/hibernate/cache/spi/support/SimpleTimestamper.java
https://github.com/theonedev/onedev/blob/master/server-core/src/main/java/org/hibernate/cache/spi/support/SimpleTimestamper.java
MIT
protected final Object invoke(Method method, Object[] args, Object proxy) throws Throwable { String methodName = method.getName(); int params = args.length; if ( params == 0 ) { if ( "writeReplace".equals( methodName ) ) { return getReplacement(); } else if ("hashCode".equals( methodName ) ) { r...
Lazy initializer for POJOs @author Gavin King
invoke
java
theonedev/onedev
server-core/src/main/java/org/hibernate/proxy/pojo/BasicLazyInitializer.java
https://github.com/theonedev/onedev/blob/master/server-core/src/main/java/org/hibernate/proxy/pojo/BasicLazyInitializer.java
MIT
private Object getReplacement() { /* * If the target has already been loaded somewhere, just not set on the proxy, * then use it to initialize the proxy so that we will serialize that instead of the proxy. */ initializeWithoutLoadIfPossible(); if ( isUninitialized() ) { if ( replacement == null ) { ...
Lazy initializer for POJOs @author Gavin King
getReplacement
java
theonedev/onedev
server-core/src/main/java/org/hibernate/proxy/pojo/BasicLazyInitializer.java
https://github.com/theonedev/onedev/blob/master/server-core/src/main/java/org/hibernate/proxy/pojo/BasicLazyInitializer.java
MIT
public final Class getPersistentClass() { return persistentClass; }
Lazy initializer for POJOs @author Gavin King
getPersistentClass
java
theonedev/onedev
server-core/src/main/java/org/hibernate/proxy/pojo/BasicLazyInitializer.java
https://github.com/theonedev/onedev/blob/master/server-core/src/main/java/org/hibernate/proxy/pojo/BasicLazyInitializer.java
MIT
@Override public final <T> Set<ConstraintViolation<T>> validate(T object, Class<?>... groups) { Contracts.assertNotNull( object, MESSAGES.validatedObjectMustNotBeNull() ); sanityCheckGroups( groups ); @SuppressWarnings("unchecked") Class<T> rootBeanClass = (Class<T>) object.getClass(); BeanMetaData<T> rootB...
The constraint initialization context is stored at this level to prevent creating a new instance each time we initialize a new constraint validator as, for now, it only contains Validator scoped objects.
validate
java
theonedev/onedev
server-core/src/main/java/org/hibernate/validator/internal/engine/ValidatorImpl.java
https://github.com/theonedev/onedev/blob/master/server-core/src/main/java/org/hibernate/validator/internal/engine/ValidatorImpl.java
MIT
@Override public final <T> Set<ConstraintViolation<T>> validateProperty(T object, String propertyName, Class<?>... groups) { Contracts.assertNotNull( object, MESSAGES.validatedObjectMustNotBeNull() ); sanityCheckPropertyPath( propertyName ); sanityCheckGroups( groups ); @SuppressWarnings("unchecked") Class<...
The constraint initialization context is stored at this level to prevent creating a new instance each time we initialize a new constraint validator as, for now, it only contains Validator scoped objects.
validateProperty
java
theonedev/onedev
server-core/src/main/java/org/hibernate/validator/internal/engine/ValidatorImpl.java
https://github.com/theonedev/onedev/blob/master/server-core/src/main/java/org/hibernate/validator/internal/engine/ValidatorImpl.java
MIT
@Override public final <T> Set<ConstraintViolation<T>> validateValue(Class<T> beanType, String propertyName, Object value, Class<?>... groups) { Contracts.assertNotNull( beanType, MESSAGES.beanTypeCannotBeNull() ); sanityCheckPropertyPath( propertyName ); sanityCheckGroups( groups ); BeanMetaData<T> rootBeanM...
The constraint initialization context is stored at this level to prevent creating a new instance each time we initialize a new constraint validator as, for now, it only contains Validator scoped objects.
validateValue
java
theonedev/onedev
server-core/src/main/java/org/hibernate/validator/internal/engine/ValidatorImpl.java
https://github.com/theonedev/onedev/blob/master/server-core/src/main/java/org/hibernate/validator/internal/engine/ValidatorImpl.java
MIT
@Override public <T> Set<ConstraintViolation<T>> validateParameters(T object, Method method, Object[] parameterValues, Class<?>... groups) { Contracts.assertNotNull( object, MESSAGES.validatedObjectMustNotBeNull() ); Contracts.assertNotNull( method, MESSAGES.validatedMethodMustNotBeNull() ); Contracts.assertNotN...
The constraint initialization context is stored at this level to prevent creating a new instance each time we initialize a new constraint validator as, for now, it only contains Validator scoped objects.
validateParameters
java
theonedev/onedev
server-core/src/main/java/org/hibernate/validator/internal/engine/ValidatorImpl.java
https://github.com/theonedev/onedev/blob/master/server-core/src/main/java/org/hibernate/validator/internal/engine/ValidatorImpl.java
MIT
@Override public <T> Set<ConstraintViolation<T>> validateConstructorParameters(Constructor<? extends T> constructor, Object[] parameterValues, Class<?>... groups) { Contracts.assertNotNull( constructor, MESSAGES.validatedConstructorMustNotBeNull() ); Contracts.assertNotNull( parameterValues, MESSAGES.validatedPara...
The constraint initialization context is stored at this level to prevent creating a new instance each time we initialize a new constraint validator as, for now, it only contains Validator scoped objects.
validateConstructorParameters
java
theonedev/onedev
server-core/src/main/java/org/hibernate/validator/internal/engine/ValidatorImpl.java
https://github.com/theonedev/onedev/blob/master/server-core/src/main/java/org/hibernate/validator/internal/engine/ValidatorImpl.java
MIT
@Override public <T> Set<ConstraintViolation<T>> validateConstructorReturnValue(Constructor<? extends T> constructor, T createdObject, Class<?>... groups) { Contracts.assertNotNull( constructor, MESSAGES.validatedConstructorMustNotBeNull() ); Contracts.assertNotNull( createdObject, MESSAGES.validatedConstructorCre...
The constraint initialization context is stored at this level to prevent creating a new instance each time we initialize a new constraint validator as, for now, it only contains Validator scoped objects.
validateConstructorReturnValue
java
theonedev/onedev
server-core/src/main/java/org/hibernate/validator/internal/engine/ValidatorImpl.java
https://github.com/theonedev/onedev/blob/master/server-core/src/main/java/org/hibernate/validator/internal/engine/ValidatorImpl.java
MIT
@Override public <T> Set<ConstraintViolation<T>> validateReturnValue(T object, Method method, Object returnValue, Class<?>... groups) { Contracts.assertNotNull( object, MESSAGES.validatedObjectMustNotBeNull() ); Contracts.assertNotNull( method, MESSAGES.validatedMethodMustNotBeNull() ); return validateReturnVal...
The constraint initialization context is stored at this level to prevent creating a new instance each time we initialize a new constraint validator as, for now, it only contains Validator scoped objects.
validateReturnValue
java
theonedev/onedev
server-core/src/main/java/org/hibernate/validator/internal/engine/ValidatorImpl.java
https://github.com/theonedev/onedev/blob/master/server-core/src/main/java/org/hibernate/validator/internal/engine/ValidatorImpl.java
MIT
private <T> Set<ConstraintViolation<T>> validateParameters(T object, Executable executable, Object[] parameterValues, Class<?>... groups) { sanityCheckGroups( groups ); @SuppressWarnings("unchecked") Class<T> rootBeanClass = object != null ? (Class<T>) object.getClass() : (Class<T>) executable.getDeclaringClass(...
The constraint initialization context is stored at this level to prevent creating a new instance each time we initialize a new constraint validator as, for now, it only contains Validator scoped objects.
validateParameters
java
theonedev/onedev
server-core/src/main/java/org/hibernate/validator/internal/engine/ValidatorImpl.java
https://github.com/theonedev/onedev/blob/master/server-core/src/main/java/org/hibernate/validator/internal/engine/ValidatorImpl.java
MIT
private <T> Set<ConstraintViolation<T>> validateReturnValue(T object, Executable executable, Object returnValue, Class<?>... groups) { sanityCheckGroups( groups ); @SuppressWarnings("unchecked") Class<T> rootBeanClass = object != null ? (Class<T>) object.getClass() : (Class<T>) executable.getDeclaringClass(); ...
The constraint initialization context is stored at this level to prevent creating a new instance each time we initialize a new constraint validator as, for now, it only contains Validator scoped objects.
validateReturnValue
java
theonedev/onedev
server-core/src/main/java/org/hibernate/validator/internal/engine/ValidatorImpl.java
https://github.com/theonedev/onedev/blob/master/server-core/src/main/java/org/hibernate/validator/internal/engine/ValidatorImpl.java
MIT
@Override public final BeanDescriptor getConstraintsForClass(Class<?> clazz) { return beanMetaDataManager.getBeanMetaData( clazz ).getBeanDescriptor(); }
The constraint initialization context is stored at this level to prevent creating a new instance each time we initialize a new constraint validator as, for now, it only contains Validator scoped objects.
getConstraintsForClass
java
theonedev/onedev
server-core/src/main/java/org/hibernate/validator/internal/engine/ValidatorImpl.java
https://github.com/theonedev/onedev/blob/master/server-core/src/main/java/org/hibernate/validator/internal/engine/ValidatorImpl.java
MIT
@Override public final <T> T unwrap(Class<T> type) { //allow unwrapping into public super types; intentionally not exposing the //fact that ExecutableValidator is implemented by this class as well as this //might change if ( type.isAssignableFrom( Validator.class ) ) { return type.cast( this ); } throw...
The constraint initialization context is stored at this level to prevent creating a new instance each time we initialize a new constraint validator as, for now, it only contains Validator scoped objects.
unwrap
java
theonedev/onedev
server-core/src/main/java/org/hibernate/validator/internal/engine/ValidatorImpl.java
https://github.com/theonedev/onedev/blob/master/server-core/src/main/java/org/hibernate/validator/internal/engine/ValidatorImpl.java
MIT
@Override public ExecutableValidator forExecutables() { return this; }
The constraint initialization context is stored at this level to prevent creating a new instance each time we initialize a new constraint validator as, for now, it only contains Validator scoped objects.
forExecutables
java
theonedev/onedev
server-core/src/main/java/org/hibernate/validator/internal/engine/ValidatorImpl.java
https://github.com/theonedev/onedev/blob/master/server-core/src/main/java/org/hibernate/validator/internal/engine/ValidatorImpl.java
MIT
private ValidationContextBuilder getValidationContextBuilder() { return new ValidationContextBuilder( constraintValidatorManager, constraintValidatorFactory, validatorScopedContext, TraversableResolvers.wrapWithCachingForSingleValidation( traversableResolver, validatorScopedContext.isTraversableResolv...
The constraint initialization context is stored at this level to prevent creating a new instance each time we initialize a new constraint validator as, for now, it only contains Validator scoped objects.
getValidationContextBuilder
java
theonedev/onedev
server-core/src/main/java/org/hibernate/validator/internal/engine/ValidatorImpl.java
https://github.com/theonedev/onedev/blob/master/server-core/src/main/java/org/hibernate/validator/internal/engine/ValidatorImpl.java
MIT
private void sanityCheckPropertyPath(String propertyName) { if ( propertyName == null || propertyName.length() == 0 ) { throw LOG.getInvalidPropertyPathException(); } }
The constraint initialization context is stored at this level to prevent creating a new instance each time we initialize a new constraint validator as, for now, it only contains Validator scoped objects.
sanityCheckPropertyPath
java
theonedev/onedev
server-core/src/main/java/org/hibernate/validator/internal/engine/ValidatorImpl.java
https://github.com/theonedev/onedev/blob/master/server-core/src/main/java/org/hibernate/validator/internal/engine/ValidatorImpl.java
MIT
private void sanityCheckGroups(Class<?>[] groups) { Contracts.assertNotNull( groups, MESSAGES.groupMustNotBeNull() ); for ( Class<?> clazz : groups ) { if ( clazz == null ) { throw new IllegalArgumentException( MESSAGES.groupMustNotBeNull() ); } } }
The constraint initialization context is stored at this level to prevent creating a new instance each time we initialize a new constraint validator as, for now, it only contains Validator scoped objects.
sanityCheckGroups
java
theonedev/onedev
server-core/src/main/java/org/hibernate/validator/internal/engine/ValidatorImpl.java
https://github.com/theonedev/onedev/blob/master/server-core/src/main/java/org/hibernate/validator/internal/engine/ValidatorImpl.java
MIT
private ValidationOrder determineGroupValidationOrder(Class<?>[] groups) { Collection<Class<?>> resultGroups; // if no groups is specified use the default if ( groups.length == 0 ) { resultGroups = DEFAULT_GROUPS; } else { resultGroups = Arrays.asList( groups ); } return validationOrderGenerator.get...
The constraint initialization context is stored at this level to prevent creating a new instance each time we initialize a new constraint validator as, for now, it only contains Validator scoped objects.
determineGroupValidationOrder
java
theonedev/onedev
server-core/src/main/java/org/hibernate/validator/internal/engine/ValidatorImpl.java
https://github.com/theonedev/onedev/blob/master/server-core/src/main/java/org/hibernate/validator/internal/engine/ValidatorImpl.java
MIT
private <T, U> Set<ConstraintViolation<T>> validateInContext(BaseBeanValidationContext<T> validationContext, BeanValueContext<U, Object> valueContext, ValidationOrder validationOrder) { if ( valueContext.getCurrentBean() == null ) { return Collections.emptySet(); } BeanMetaData<U> beanMetaData = valueConte...
Validates the given object using the available context information. @param validationContext the global validation context @param valueContext the current validation context @param validationOrder Contains the information which and in which order groups have to be executed @param <T> The root bean type @return Set of...
validateInContext
java
theonedev/onedev
server-core/src/main/java/org/hibernate/validator/internal/engine/ValidatorImpl.java
https://github.com/theonedev/onedev/blob/master/server-core/src/main/java/org/hibernate/validator/internal/engine/ValidatorImpl.java
MIT
private void validateConstraintsForCurrentGroup(BaseBeanValidationContext<?> validationContext, BeanValueContext<?, Object> valueContext) { /* * Make sure child annotation can override parent annotation with same type. To make * this possible, we discard the group sequence definition feature which is rarely us...
Validates the given object using the available context information. @param validationContext the global validation context @param valueContext the current validation context @param validationOrder Contains the information which and in which order groups have to be executed @param <T> The root bean type @return Set of...
validateConstraintsForCurrentGroup
java
theonedev/onedev
server-core/src/main/java/org/hibernate/validator/internal/engine/ValidatorImpl.java
https://github.com/theonedev/onedev/blob/master/server-core/src/main/java/org/hibernate/validator/internal/engine/ValidatorImpl.java
MIT
@SuppressWarnings("unused") private <U> void validateConstraintsForDefaultGroup(BaseBeanValidationContext<?> validationContext, BeanValueContext<U, Object> valueContext) { final BeanMetaData<U> beanMetaData = valueContext.getCurrentBeanMetaData(); final Map<Class<?>, Class<?>> validatedInterfaces = new HashMap<>()...
Validates the given object using the available context information. @param validationContext the global validation context @param valueContext the current validation context @param validationOrder Contains the information which and in which order groups have to be executed @param <T> The root bean type @return Set of...
validateConstraintsForDefaultGroup
java
theonedev/onedev
server-core/src/main/java/org/hibernate/validator/internal/engine/ValidatorImpl.java
https://github.com/theonedev/onedev/blob/master/server-core/src/main/java/org/hibernate/validator/internal/engine/ValidatorImpl.java
MIT
private <U> boolean validateConstraintsForSingleDefaultGroupElement(BaseBeanValidationContext<?> validationContext, ValueContext<U, Object> valueContext, final Map<Class<?>, Class<?>> validatedInterfaces, Class<? super U> clazz, Set<MetaConstraint<?>> metaConstraints, Group defaultSequenceMember) { boolean validat...
Validates the given object using the available context information. @param validationContext the global validation context @param valueContext the current validation context @param validationOrder Contains the information which and in which order groups have to be executed @param <T> The root bean type @return Set of...
validateConstraintsForSingleDefaultGroupElement
java
theonedev/onedev
server-core/src/main/java/org/hibernate/validator/internal/engine/ValidatorImpl.java
https://github.com/theonedev/onedev/blob/master/server-core/src/main/java/org/hibernate/validator/internal/engine/ValidatorImpl.java
MIT
private void validateConstraintsForNonDefaultGroup(BaseBeanValidationContext<?> validationContext, BeanValueContext<?, Object> valueContext) { validateMetaConstraints( validationContext, valueContext, valueContext.getCurrentBean(), valueContext.getCurrentBeanMetaData().getMetaConstraints() ); validationContext.mark...
Validates the given object using the available context information. @param validationContext the global validation context @param valueContext the current validation context @param validationOrder Contains the information which and in which order groups have to be executed @param <T> The root bean type @return Set of...
validateConstraintsForNonDefaultGroup
java
theonedev/onedev
server-core/src/main/java/org/hibernate/validator/internal/engine/ValidatorImpl.java
https://github.com/theonedev/onedev/blob/master/server-core/src/main/java/org/hibernate/validator/internal/engine/ValidatorImpl.java
MIT
private void validateMetaConstraints(BaseBeanValidationContext<?> validationContext, ValueContext<?, Object> valueContext, Object parent, Iterable<MetaConstraint<?>> constraints) { List<MetaConstraint<?>> sortedConstraints = new ArrayList<>(); for ( MetaConstraint<?> metaConstraint : constraints ) sortedCon...
Validates the given object using the available context information. @param validationContext the global validation context @param valueContext the current validation context @param validationOrder Contains the information which and in which order groups have to be executed @param <T> The root bean type @return Set of...
validateMetaConstraints
java
theonedev/onedev
server-core/src/main/java/org/hibernate/validator/internal/engine/ValidatorImpl.java
https://github.com/theonedev/onedev/blob/master/server-core/src/main/java/org/hibernate/validator/internal/engine/ValidatorImpl.java
MIT
@Override public int compare(MetaConstraint<?> o1, MetaConstraint<?> o2) { if (o1.getDescriptor().getAnnotationType() == ClassValidating.class) return 1; else return -1; }
Validates the given object using the available context information. @param validationContext the global validation context @param valueContext the current validation context @param validationOrder Contains the information which and in which order groups have to be executed @param <T> The root bean type @return Set of...
compare
java
theonedev/onedev
server-core/src/main/java/org/hibernate/validator/internal/engine/ValidatorImpl.java
https://github.com/theonedev/onedev/blob/master/server-core/src/main/java/org/hibernate/validator/internal/engine/ValidatorImpl.java
MIT
private boolean validateMetaConstraint(BaseBeanValidationContext<?> validationContext, ValueContext<?, Object> valueContext, Object parent, MetaConstraint<?> metaConstraint) { BeanValueContext.ValueState<Object> originalValueState = valueContext.getCurrentValueState(); valueContext.appendNode( metaConstraint.getLoc...
Validates the given object using the available context information. @param validationContext the global validation context @param valueContext the current validation context @param validationOrder Contains the information which and in which order groups have to be executed @param <T> The root bean type @return Set of...
validateMetaConstraint
java
theonedev/onedev
server-core/src/main/java/org/hibernate/validator/internal/engine/ValidatorImpl.java
https://github.com/theonedev/onedev/blob/master/server-core/src/main/java/org/hibernate/validator/internal/engine/ValidatorImpl.java
MIT
private void validateCascadedConstraints(BaseBeanValidationContext<?> validationContext, ValueContext<?, Object> valueContext) { Validatable validatable = valueContext.getCurrentValidatable(); BeanValueContext.ValueState<Object> originalValueState = valueContext.getCurrentValueState(); for ( Cascadable cascadabl...
Validates all cascaded constraints for the given bean using the current group set in the execution context. This method must always be called after validateConstraints for the same context. @param validationContext The execution context @param valueContext Collected information for single validation
validateCascadedConstraints
java
theonedev/onedev
server-core/src/main/java/org/hibernate/validator/internal/engine/ValidatorImpl.java
https://github.com/theonedev/onedev/blob/master/server-core/src/main/java/org/hibernate/validator/internal/engine/ValidatorImpl.java
MIT
private void validateCascadedAnnotatedObjectForCurrentGroup(Object value, BaseBeanValidationContext<?> validationContext, ValueContext<?, Object> valueContext, CascadingMetaData cascadingMetaData) { // We need to convert the group before checking if the bean was processed or not // as group defines the processed...
Validates all cascaded constraints for the given bean using the current group set in the execution context. This method must always be called after validateConstraints for the same context. @param validationContext The execution context @param valueContext Collected information for single validation
validateCascadedAnnotatedObjectForCurrentGroup
java
theonedev/onedev
server-core/src/main/java/org/hibernate/validator/internal/engine/ValidatorImpl.java
https://github.com/theonedev/onedev/blob/master/server-core/src/main/java/org/hibernate/validator/internal/engine/ValidatorImpl.java
MIT
private void validateCascadedContainerElementsForCurrentGroup(Object value, BaseBeanValidationContext<?> validationContext, ValueContext<?, ?> valueContext, List<ContainerCascadingMetaData> containerElementTypesCascadingMetaData) { for ( ContainerCascadingMetaData cascadingMetaData : containerElementTypesCascading...
Validates all cascaded constraints for the given bean using the current group set in the execution context. This method must always be called after validateConstraints for the same context. @param validationContext The execution context @param valueContext Collected information for single validation
validateCascadedContainerElementsForCurrentGroup
java
theonedev/onedev
server-core/src/main/java/org/hibernate/validator/internal/engine/ValidatorImpl.java
https://github.com/theonedev/onedev/blob/master/server-core/src/main/java/org/hibernate/validator/internal/engine/ValidatorImpl.java
MIT
@Override public void value(String nodeName, Object value) { doValidate( value, nodeName ); }
Validates all cascaded constraints for the given bean using the current group set in the execution context. This method must always be called after validateConstraints for the same context. @param validationContext The execution context @param valueContext Collected information for single validation
value
java
theonedev/onedev
server-core/src/main/java/org/hibernate/validator/internal/engine/ValidatorImpl.java
https://github.com/theonedev/onedev/blob/master/server-core/src/main/java/org/hibernate/validator/internal/engine/ValidatorImpl.java
MIT