id int32 0 165k | repo stringlengths 7 58 | path stringlengths 12 218 | func_name stringlengths 3 140 | original_string stringlengths 73 34.1k | language stringclasses 1
value | code stringlengths 73 34.1k | code_tokens list | docstring stringlengths 3 16k | docstring_tokens list | sha stringlengths 40 40 | url stringlengths 105 339 |
|---|---|---|---|---|---|---|---|---|---|---|---|
22,600 | jamesagnew/hapi-fhir | hapi-fhir-utilities/src/main/java/org/hl7/fhir/utilities/IniFile.java | IniFile.delRemChars | private String delRemChars(String pstrSrc)
{
int intPos = 0;
if (pstrSrc == null) return null;
while ((intPos = pstrSrc.indexOf(";")) >= 0)
{
if (intPos == 0)
pstrSrc = pstrSrc.substring(intPos + 1);
else if (intPos > 0)
... | java | private String delRemChars(String pstrSrc)
{
int intPos = 0;
if (pstrSrc == null) return null;
while ((intPos = pstrSrc.indexOf(";")) >= 0)
{
if (intPos == 0)
pstrSrc = pstrSrc.substring(intPos + 1);
else if (intPos > 0)
... | [
"private",
"String",
"delRemChars",
"(",
"String",
"pstrSrc",
")",
"{",
"int",
"intPos",
"=",
"0",
";",
"if",
"(",
"pstrSrc",
"==",
"null",
")",
"return",
"null",
";",
"while",
"(",
"(",
"intPos",
"=",
"pstrSrc",
".",
"indexOf",
"(",
"\";\"",
")",
")... | This function deletes the remark characters ';' from source string
@param pstrSrc the source string
@return the converted string | [
"This",
"function",
"deletes",
"the",
"remark",
"characters",
";",
"from",
"source",
"string"
] | 150a84d52fe691b7f48fcb28247c4bddb7aec352 | https://github.com/jamesagnew/hapi-fhir/blob/150a84d52fe691b7f48fcb28247c4bddb7aec352/hapi-fhir-utilities/src/main/java/org/hl7/fhir/utilities/IniFile.java#L1159-L1172 |
22,601 | jamesagnew/hapi-fhir | hapi-fhir-utilities/src/main/java/org/hl7/fhir/utilities/IniFile.java | IniFile.addRemChars | private String addRemChars(String pstrSrc)
{
int intLen = 2;
int intPos = 0;
int intPrev = 0;
String strLeft = null;
String strRight = null;
if (pstrSrc == null) return null;
while (intPos >= 0)
{
intLen = 2;
i... | java | private String addRemChars(String pstrSrc)
{
int intLen = 2;
int intPos = 0;
int intPrev = 0;
String strLeft = null;
String strRight = null;
if (pstrSrc == null) return null;
while (intPos >= 0)
{
intLen = 2;
i... | [
"private",
"String",
"addRemChars",
"(",
"String",
"pstrSrc",
")",
"{",
"int",
"intLen",
"=",
"2",
";",
"int",
"intPos",
"=",
"0",
";",
"int",
"intPrev",
"=",
"0",
";",
"String",
"strLeft",
"=",
"null",
";",
"String",
"strRight",
"=",
"null",
";",
"i... | This function adds a remark character ';' in source string.
@param pstrSrc source string
@return converted string. | [
"This",
"function",
"adds",
"a",
"remark",
"character",
";",
"in",
"source",
"string",
"."
] | 150a84d52fe691b7f48fcb28247c4bddb7aec352 | https://github.com/jamesagnew/hapi-fhir/blob/150a84d52fe691b7f48fcb28247c4bddb7aec352/hapi-fhir-utilities/src/main/java/org/hl7/fhir/utilities/IniFile.java#L1179-L1221 |
22,602 | jamesagnew/hapi-fhir | hapi-fhir-utilities/src/main/java/org/hl7/fhir/utilities/IniFile.java | IniFile.main | public static void main(String[] pstrArgs)
{
IniFile objINI = null;
String strFile = null;
if (pstrArgs.length == 0) return;
strFile = pstrArgs[0];
// Following call will load the strFile if one exists.
objINI = new IniFile(strFile);
// objINI.a... | java | public static void main(String[] pstrArgs)
{
IniFile objINI = null;
String strFile = null;
if (pstrArgs.length == 0) return;
strFile = pstrArgs[0];
// Following call will load the strFile if one exists.
objINI = new IniFile(strFile);
// objINI.a... | [
"public",
"static",
"void",
"main",
"(",
"String",
"[",
"]",
"pstrArgs",
")",
"{",
"IniFile",
"objINI",
"=",
"null",
";",
"String",
"strFile",
"=",
"null",
";",
"if",
"(",
"pstrArgs",
".",
"length",
"==",
"0",
")",
"return",
";",
"strFile",
"=",
"pst... | The main entry point for testing.
@param pstrArgs the command line arguments array if any.
@ | [
"The",
"main",
"entry",
"point",
"for",
"testing",
"."
] | 150a84d52fe691b7f48fcb28247c4bddb7aec352 | https://github.com/jamesagnew/hapi-fhir/blob/150a84d52fe691b7f48fcb28247c4bddb7aec352/hapi-fhir-utilities/src/main/java/org/hl7/fhir/utilities/IniFile.java#L1230-L1256 |
22,603 | jamesagnew/hapi-fhir | hapi-fhir-structures-r4/src/main/java/org/hl7/fhir/r4/utils/DefinitionNavigator.java | DefinitionNavigator.hasTypeChildren | public boolean hasTypeChildren(TypeRefComponent type) throws DefinitionException {
if (typeChildren == null || typeOfChildren != type) {
loadTypedChildren(type);
}
return !typeChildren.isEmpty();
} | java | public boolean hasTypeChildren(TypeRefComponent type) throws DefinitionException {
if (typeChildren == null || typeOfChildren != type) {
loadTypedChildren(type);
}
return !typeChildren.isEmpty();
} | [
"public",
"boolean",
"hasTypeChildren",
"(",
"TypeRefComponent",
"type",
")",
"throws",
"DefinitionException",
"{",
"if",
"(",
"typeChildren",
"==",
"null",
"||",
"typeOfChildren",
"!=",
"type",
")",
"{",
"loadTypedChildren",
"(",
"type",
")",
";",
"}",
"return"... | if you have a typed element, the tree might end at that point.
And you may or may not want to walk into the tree of that type
It depends what you are doing. So this is a choice. You can
ask for the children, and then, if you get no children, you
can see if there are children defined for the type, and then
get them
you... | [
"if",
"you",
"have",
"a",
"typed",
"element",
"the",
"tree",
"might",
"end",
"at",
"that",
"point",
".",
"And",
"you",
"may",
"or",
"may",
"not",
"want",
"to",
"walk",
"into",
"the",
"tree",
"of",
"that",
"type",
"It",
"depends",
"what",
"you",
"are"... | 150a84d52fe691b7f48fcb28247c4bddb7aec352 | https://github.com/jamesagnew/hapi-fhir/blob/150a84d52fe691b7f48fcb28247c4bddb7aec352/hapi-fhir-structures-r4/src/main/java/org/hl7/fhir/r4/utils/DefinitionNavigator.java#L139-L144 |
22,604 | jamesagnew/hapi-fhir | hapi-fhir-base/src/main/java/ca/uhn/fhir/model/api/TagList.java | TagList.addTag | public Tag addTag(String theScheme, String theTerm) {
Tag retVal = new Tag(theScheme, theTerm);
add(retVal);
myOrderedTags = null;
return retVal;
} | java | public Tag addTag(String theScheme, String theTerm) {
Tag retVal = new Tag(theScheme, theTerm);
add(retVal);
myOrderedTags = null;
return retVal;
} | [
"public",
"Tag",
"addTag",
"(",
"String",
"theScheme",
",",
"String",
"theTerm",
")",
"{",
"Tag",
"retVal",
"=",
"new",
"Tag",
"(",
"theScheme",
",",
"theTerm",
")",
";",
"add",
"(",
"retVal",
")",
";",
"myOrderedTags",
"=",
"null",
";",
"return",
"ret... | Add a new tag instance
@param theScheme
The tag scheme (the system)
@param theTerm
The tag term (the code)
@return Returns the newly created tag instance. Note that the tag is added to the list by this method, so you
generally do not need to interact directly with the added tag. | [
"Add",
"a",
"new",
"tag",
"instance"
] | 150a84d52fe691b7f48fcb28247c4bddb7aec352 | https://github.com/jamesagnew/hapi-fhir/blob/150a84d52fe691b7f48fcb28247c4bddb7aec352/hapi-fhir-base/src/main/java/ca/uhn/fhir/model/api/TagList.java#L113-L118 |
22,605 | jamesagnew/hapi-fhir | hapi-fhir-client/src/main/java/ca/uhn/fhir/rest/client/impl/RestfulClientFactory.java | RestfulClientFactory.newClient | @Override
public synchronized <T extends IRestfulClient> T newClient(Class<T> theClientType, String theServerBase) {
validateConfigured();
if (!theClientType.isInterface()) {
throw new ConfigurationException(theClientType.getCanonicalName() + " is not an interface");
}
ClientInvocationHandlerFactory invoc... | java | @Override
public synchronized <T extends IRestfulClient> T newClient(Class<T> theClientType, String theServerBase) {
validateConfigured();
if (!theClientType.isInterface()) {
throw new ConfigurationException(theClientType.getCanonicalName() + " is not an interface");
}
ClientInvocationHandlerFactory invoc... | [
"@",
"Override",
"public",
"synchronized",
"<",
"T",
"extends",
"IRestfulClient",
">",
"T",
"newClient",
"(",
"Class",
"<",
"T",
">",
"theClientType",
",",
"String",
"theServerBase",
")",
"{",
"validateConfigured",
"(",
")",
";",
"if",
"(",
"!",
"theClientTy... | Instantiates a new client instance
@param theClientType
The client type, which is an interface type to be instantiated
@param theServerBase
The URL of the base for the restful FHIR server to connect to
@return A newly created client
@throws ConfigurationException
If the interface type is not an interface | [
"Instantiates",
"a",
"new",
"client",
"instance"
] | 150a84d52fe691b7f48fcb28247c4bddb7aec352 | https://github.com/jamesagnew/hapi-fhir/blob/150a84d52fe691b7f48fcb28247c4bddb7aec352/hapi-fhir-client/src/main/java/ca/uhn/fhir/rest/client/impl/RestfulClientFactory.java#L139-L159 |
22,606 | jamesagnew/hapi-fhir | hapi-fhir-client/src/main/java/ca/uhn/fhir/rest/client/impl/RestfulClientFactory.java | RestfulClientFactory.setFhirContext | public void setFhirContext(FhirContext theContext) {
if (myContext != null && myContext != theContext) {
throw new IllegalStateException("RestfulClientFactory instance is already associated with one FhirContext. RestfulClientFactory instances can not be shared.");
}
myContext = theContext;
} | java | public void setFhirContext(FhirContext theContext) {
if (myContext != null && myContext != theContext) {
throw new IllegalStateException("RestfulClientFactory instance is already associated with one FhirContext. RestfulClientFactory instances can not be shared.");
}
myContext = theContext;
} | [
"public",
"void",
"setFhirContext",
"(",
"FhirContext",
"theContext",
")",
"{",
"if",
"(",
"myContext",
"!=",
"null",
"&&",
"myContext",
"!=",
"theContext",
")",
"{",
"throw",
"new",
"IllegalStateException",
"(",
"\"RestfulClientFactory instance is already associated wi... | Sets the context associated with this client factory. Must not be called more than once. | [
"Sets",
"the",
"context",
"associated",
"with",
"this",
"client",
"factory",
".",
"Must",
"not",
"be",
"called",
"more",
"than",
"once",
"."
] | 150a84d52fe691b7f48fcb28247c4bddb7aec352 | https://github.com/jamesagnew/hapi-fhir/blob/150a84d52fe691b7f48fcb28247c4bddb7aec352/hapi-fhir-client/src/main/java/ca/uhn/fhir/rest/client/impl/RestfulClientFactory.java#L203-L208 |
22,607 | jamesagnew/hapi-fhir | hapi-fhir-structures-dstu/src/main/java/ca/uhn/fhir/model/dstu/resource/BaseResource.java | BaseResource.getAllPopulatedChildElementsOfType | @Override
public <T extends IElement> List<T> getAllPopulatedChildElementsOfType(Class<T> theType) {
return Collections.emptyList();
} | java | @Override
public <T extends IElement> List<T> getAllPopulatedChildElementsOfType(Class<T> theType) {
return Collections.emptyList();
} | [
"@",
"Override",
"public",
"<",
"T",
"extends",
"IElement",
">",
"List",
"<",
"T",
">",
"getAllPopulatedChildElementsOfType",
"(",
"Class",
"<",
"T",
">",
"theType",
")",
"{",
"return",
"Collections",
".",
"emptyList",
"(",
")",
";",
"}"
] | NOP implementation of this method.
@see ICompositeElement#getAllPopulatedChildElementsOfType(Class) for an explanation of why you
don't need to override this method | [
"NOP",
"implementation",
"of",
"this",
"method",
"."
] | 150a84d52fe691b7f48fcb28247c4bddb7aec352 | https://github.com/jamesagnew/hapi-fhir/blob/150a84d52fe691b7f48fcb28247c4bddb7aec352/hapi-fhir-structures-dstu/src/main/java/ca/uhn/fhir/model/dstu/resource/BaseResource.java#L103-L106 |
22,608 | jamesagnew/hapi-fhir | hapi-fhir-structures-dstu3/src/main/java/org/hl7/fhir/dstu3/model/Meta.java | Meta.addTag | public Meta addTag(String theSystem, String theCode, String theDisplay) {
addTag().setSystem(theSystem).setCode(theCode).setDisplay(theDisplay);
return this;
} | java | public Meta addTag(String theSystem, String theCode, String theDisplay) {
addTag().setSystem(theSystem).setCode(theCode).setDisplay(theDisplay);
return this;
} | [
"public",
"Meta",
"addTag",
"(",
"String",
"theSystem",
",",
"String",
"theCode",
",",
"String",
"theDisplay",
")",
"{",
"addTag",
"(",
")",
".",
"setSystem",
"(",
"theSystem",
")",
".",
"setCode",
"(",
"theCode",
")",
".",
"setDisplay",
"(",
"theDisplay",... | Convenience method which adds a tag
@param theSystem The code system
@param theCode The code
@param theDisplay The display name
@return Returns a reference to <code>this</code> for easy chaining | [
"Convenience",
"method",
"which",
"adds",
"a",
"tag"
] | 150a84d52fe691b7f48fcb28247c4bddb7aec352 | https://github.com/jamesagnew/hapi-fhir/blob/150a84d52fe691b7f48fcb28247c4bddb7aec352/hapi-fhir-structures-dstu3/src/main/java/org/hl7/fhir/dstu3/model/Meta.java#L371-L374 |
22,609 | jamesagnew/hapi-fhir | hapi-fhir-base/src/main/java/ca/uhn/fhir/util/ElementUtil.java | ElementUtil.allPopulatedChildElements | public static <T extends IElement> List<T> allPopulatedChildElements(Class<T> theType, Object... theElements) {
ArrayList<T> retVal = new ArrayList<T>();
for (Object next : theElements) {
if (next == null) {
continue;
}else if (next instanceof IElement) {
addElement(retVal, (IElement) next, theType);
... | java | public static <T extends IElement> List<T> allPopulatedChildElements(Class<T> theType, Object... theElements) {
ArrayList<T> retVal = new ArrayList<T>();
for (Object next : theElements) {
if (next == null) {
continue;
}else if (next instanceof IElement) {
addElement(retVal, (IElement) next, theType);
... | [
"public",
"static",
"<",
"T",
"extends",
"IElement",
">",
"List",
"<",
"T",
">",
"allPopulatedChildElements",
"(",
"Class",
"<",
"T",
">",
"theType",
",",
"Object",
"...",
"theElements",
")",
"{",
"ArrayList",
"<",
"T",
">",
"retVal",
"=",
"new",
"ArrayL... | Note that this method does not work on HL7.org structures | [
"Note",
"that",
"this",
"method",
"does",
"not",
"work",
"on",
"HL7",
".",
"org",
"structures"
] | 150a84d52fe691b7f48fcb28247c4bddb7aec352 | https://github.com/jamesagnew/hapi-fhir/blob/150a84d52fe691b7f48fcb28247c4bddb7aec352/hapi-fhir-base/src/main/java/ca/uhn/fhir/util/ElementUtil.java#L120-L140 |
22,610 | jamesagnew/hapi-fhir | hapi-fhir-utilities/src/main/java/org/hl7/fhir/utilities/CSVReader.java | CSVReader.parseLine | public String[] parseLine() throws IOException, FHIRException {
List<String> res = new ArrayList<String>();
StringBuilder b = new StringBuilder();
boolean inQuote = false;
while (inQuote || (peek() != '\r' && peek() != '\n')) {
char c = peek();
next();
if (c == '"')
inQuote = !inQuote;
... | java | public String[] parseLine() throws IOException, FHIRException {
List<String> res = new ArrayList<String>();
StringBuilder b = new StringBuilder();
boolean inQuote = false;
while (inQuote || (peek() != '\r' && peek() != '\n')) {
char c = peek();
next();
if (c == '"')
inQuote = !inQuote;
... | [
"public",
"String",
"[",
"]",
"parseLine",
"(",
")",
"throws",
"IOException",
",",
"FHIRException",
"{",
"List",
"<",
"String",
">",
"res",
"=",
"new",
"ArrayList",
"<",
"String",
">",
"(",
")",
";",
"StringBuilder",
"b",
"=",
"new",
"StringBuilder",
"("... | Split one line in a CSV file into its rows. Comma's appearing in double quoted strings will
not be seen as a separator.
@return
@throws IOException
@throws FHIRException
@ | [
"Split",
"one",
"line",
"in",
"a",
"CSV",
"file",
"into",
"its",
"rows",
".",
"Comma",
"s",
"appearing",
"in",
"double",
"quoted",
"strings",
"will",
"not",
"be",
"seen",
"as",
"a",
"separator",
"."
] | 150a84d52fe691b7f48fcb28247c4bddb7aec352 | https://github.com/jamesagnew/hapi-fhir/blob/150a84d52fe691b7f48fcb28247c4bddb7aec352/hapi-fhir-utilities/src/main/java/org/hl7/fhir/utilities/CSVReader.java#L119-L145 |
22,611 | jamesagnew/hapi-fhir | hapi-fhir-structures-r4/src/main/java/org/hl7/fhir/r4/utils/client/ClientUtils.java | ClientUtils.unmarshalReference | @SuppressWarnings("unchecked")
protected <T extends Resource> T unmarshalReference(HttpResponse response, String format) {
T resource = null;
OperationOutcome error = null;
byte[] cnt = log(response);
if (cnt != null) {
try {
resource = (T)getParser(format).parse(cnt);
if... | java | @SuppressWarnings("unchecked")
protected <T extends Resource> T unmarshalReference(HttpResponse response, String format) {
T resource = null;
OperationOutcome error = null;
byte[] cnt = log(response);
if (cnt != null) {
try {
resource = (T)getParser(format).parse(cnt);
if... | [
"@",
"SuppressWarnings",
"(",
"\"unchecked\"",
")",
"protected",
"<",
"T",
"extends",
"Resource",
">",
"T",
"unmarshalReference",
"(",
"HttpResponse",
"response",
",",
"String",
"format",
")",
"{",
"T",
"resource",
"=",
"null",
";",
"OperationOutcome",
"error",
... | Unmarshals a resource from the response stream.
@param response
@return | [
"Unmarshals",
"a",
"resource",
"from",
"the",
"response",
"stream",
"."
] | 150a84d52fe691b7f48fcb28247c4bddb7aec352 | https://github.com/jamesagnew/hapi-fhir/blob/150a84d52fe691b7f48fcb28247c4bddb7aec352/hapi-fhir-structures-r4/src/main/java/org/hl7/fhir/r4/utils/client/ClientUtils.java#L324-L345 |
22,612 | jamesagnew/hapi-fhir | hapi-fhir-structures-r4/src/main/java/org/hl7/fhir/r4/utils/client/ClientUtils.java | ClientUtils.unmarshalFeed | protected Bundle unmarshalFeed(HttpResponse response, String format) {
Bundle feed = null;
byte[] cnt = log(response);
String contentType = response.getHeaders("Content-Type")[0].getValue();
OperationOutcome error = null;
try {
if (cnt != null) {
if(contentType.contains(Resource... | java | protected Bundle unmarshalFeed(HttpResponse response, String format) {
Bundle feed = null;
byte[] cnt = log(response);
String contentType = response.getHeaders("Content-Type")[0].getValue();
OperationOutcome error = null;
try {
if (cnt != null) {
if(contentType.contains(Resource... | [
"protected",
"Bundle",
"unmarshalFeed",
"(",
"HttpResponse",
"response",
",",
"String",
"format",
")",
"{",
"Bundle",
"feed",
"=",
"null",
";",
"byte",
"[",
"]",
"cnt",
"=",
"log",
"(",
"response",
")",
";",
"String",
"contentType",
"=",
"response",
".",
... | Unmarshals Bundle from response stream.
@param response
@return | [
"Unmarshals",
"Bundle",
"from",
"response",
"stream",
"."
] | 150a84d52fe691b7f48fcb28247c4bddb7aec352 | https://github.com/jamesagnew/hapi-fhir/blob/150a84d52fe691b7f48fcb28247c4bddb7aec352/hapi-fhir-structures-r4/src/main/java/org/hl7/fhir/r4/utils/client/ClientUtils.java#L353-L380 |
22,613 | jamesagnew/hapi-fhir | hapi-fhir-structures-r4/src/main/java/org/hl7/fhir/r4/utils/client/ClientUtils.java | ClientUtils.writeInputStreamAsString | protected String writeInputStreamAsString(InputStream instream) {
String value = null;
try {
value = IOUtils.toString(instream, "UTF-8");
System.out.println(value);
} catch(IOException ioe) {
//Do nothing
}
return value;
} | java | protected String writeInputStreamAsString(InputStream instream) {
String value = null;
try {
value = IOUtils.toString(instream, "UTF-8");
System.out.println(value);
} catch(IOException ioe) {
//Do nothing
}
return value;
} | [
"protected",
"String",
"writeInputStreamAsString",
"(",
"InputStream",
"instream",
")",
"{",
"String",
"value",
"=",
"null",
";",
"try",
"{",
"value",
"=",
"IOUtils",
".",
"toString",
"(",
"instream",
",",
"\"UTF-8\"",
")",
";",
"System",
".",
"out",
".",
... | Used for debugging
@param instream
@return | [
"Used",
"for",
"debugging"
] | 150a84d52fe691b7f48fcb28247c4bddb7aec352 | https://github.com/jamesagnew/hapi-fhir/blob/150a84d52fe691b7f48fcb28247c4bddb7aec352/hapi-fhir-structures-r4/src/main/java/org/hl7/fhir/r4/utils/client/ClientUtils.java#L621-L631 |
22,614 | jamesagnew/hapi-fhir | hapi-fhir-server/src/main/java/ca/uhn/fhir/rest/server/RestfulServerUtils.java | RestfulServerUtils.determineResponseEncodingNoDefault | public static ResponseEncoding determineResponseEncodingNoDefault(RequestDetails theReq, EncodingEnum thePrefer) {
return determineResponseEncodingNoDefault(theReq, thePrefer, null);
} | java | public static ResponseEncoding determineResponseEncodingNoDefault(RequestDetails theReq, EncodingEnum thePrefer) {
return determineResponseEncodingNoDefault(theReq, thePrefer, null);
} | [
"public",
"static",
"ResponseEncoding",
"determineResponseEncodingNoDefault",
"(",
"RequestDetails",
"theReq",
",",
"EncodingEnum",
"thePrefer",
")",
"{",
"return",
"determineResponseEncodingNoDefault",
"(",
"theReq",
",",
"thePrefer",
",",
"null",
")",
";",
"}"
] | Returns null if the request doesn't express that it wants FHIR. If it expresses that it wants XML and JSON
equally, returns thePrefer. | [
"Returns",
"null",
"if",
"the",
"request",
"doesn",
"t",
"express",
"that",
"it",
"wants",
"FHIR",
".",
"If",
"it",
"expresses",
"that",
"it",
"wants",
"XML",
"and",
"JSON",
"equally",
"returns",
"thePrefer",
"."
] | 150a84d52fe691b7f48fcb28247c4bddb7aec352 | https://github.com/jamesagnew/hapi-fhir/blob/150a84d52fe691b7f48fcb28247c4bddb7aec352/hapi-fhir-server/src/main/java/ca/uhn/fhir/rest/server/RestfulServerUtils.java#L365-L367 |
22,615 | jamesagnew/hapi-fhir | hapi-fhir-utilities/src/main/java/org/hl7/fhir/utilities/cache/NpmPackage.java | NpmPackage.list | public List<String> list(String folder) throws IOException {
List<String> res = new ArrayList<String>();
if (path != null) {
File f = new File(Utilities.path(path, folder));
if (f.exists() && f.isDirectory())
for (String s : f.list())
res.add(s);
} else {
... | java | public List<String> list(String folder) throws IOException {
List<String> res = new ArrayList<String>();
if (path != null) {
File f = new File(Utilities.path(path, folder));
if (f.exists() && f.isDirectory())
for (String s : f.list())
res.add(s);
} else {
... | [
"public",
"List",
"<",
"String",
">",
"list",
"(",
"String",
"folder",
")",
"throws",
"IOException",
"{",
"List",
"<",
"String",
">",
"res",
"=",
"new",
"ArrayList",
"<",
"String",
">",
"(",
")",
";",
"if",
"(",
"path",
"!=",
"null",
")",
"{",
"Fil... | Accessing the contents of the package - get a list of files in a subfolder of the package
@param folder
@return
@throws IOException | [
"Accessing",
"the",
"contents",
"of",
"the",
"package",
"-",
"get",
"a",
"list",
"of",
"files",
"in",
"a",
"subfolder",
"of",
"the",
"package"
] | 150a84d52fe691b7f48fcb28247c4bddb7aec352 | https://github.com/jamesagnew/hapi-fhir/blob/150a84d52fe691b7f48fcb28247c4bddb7aec352/hapi-fhir-utilities/src/main/java/org/hl7/fhir/utilities/cache/NpmPackage.java#L110-L124 |
22,616 | jamesagnew/hapi-fhir | hapi-fhir-utilities/src/main/java/org/hl7/fhir/utilities/cache/NpmPackage.java | NpmPackage.load | public InputStream load(String folder, String file) throws IOException {
if (content.containsKey(folder+"/"+file))
return new ByteArrayInputStream(content.get(folder+"/"+file));
else {
File f = new File(Utilities.path(path, folder, file));
if (f.exists())
return new F... | java | public InputStream load(String folder, String file) throws IOException {
if (content.containsKey(folder+"/"+file))
return new ByteArrayInputStream(content.get(folder+"/"+file));
else {
File f = new File(Utilities.path(path, folder, file));
if (f.exists())
return new F... | [
"public",
"InputStream",
"load",
"(",
"String",
"folder",
",",
"String",
"file",
")",
"throws",
"IOException",
"{",
"if",
"(",
"content",
".",
"containsKey",
"(",
"folder",
"+",
"\"/\"",
"+",
"file",
")",
")",
"return",
"new",
"ByteArrayInputStream",
"(",
... | get a stream that contains the contents of one of the files in a folder
@param folder
@param file
@return
@throws IOException | [
"get",
"a",
"stream",
"that",
"contains",
"the",
"contents",
"of",
"one",
"of",
"the",
"files",
"in",
"a",
"folder"
] | 150a84d52fe691b7f48fcb28247c4bddb7aec352 | https://github.com/jamesagnew/hapi-fhir/blob/150a84d52fe691b7f48fcb28247c4bddb7aec352/hapi-fhir-utilities/src/main/java/org/hl7/fhir/utilities/cache/NpmPackage.java#L173-L182 |
22,617 | jamesagnew/hapi-fhir | hapi-fhir-utilities/src/main/java/org/hl7/fhir/utilities/cache/NpmPackage.java | NpmPackage.fhirVersion | public String fhirVersion() {
if ("hl7.fhir.core".equals(npm.get("name").getAsString()))
return npm.get("version").getAsString();
else
return npm.getAsJsonObject("dependencies").get("hl7.fhir.core").getAsString();
} | java | public String fhirVersion() {
if ("hl7.fhir.core".equals(npm.get("name").getAsString()))
return npm.get("version").getAsString();
else
return npm.getAsJsonObject("dependencies").get("hl7.fhir.core").getAsString();
} | [
"public",
"String",
"fhirVersion",
"(",
")",
"{",
"if",
"(",
"\"hl7.fhir.core\"",
".",
"equals",
"(",
"npm",
".",
"get",
"(",
"\"name\"",
")",
".",
"getAsString",
"(",
")",
")",
")",
"return",
"npm",
".",
"get",
"(",
"\"version\"",
")",
".",
"getAsStri... | convenience method for getting the package fhir version
@return | [
"convenience",
"method",
"for",
"getting",
"the",
"package",
"fhir",
"version"
] | 150a84d52fe691b7f48fcb28247c4bddb7aec352 | https://github.com/jamesagnew/hapi-fhir/blob/150a84d52fe691b7f48fcb28247c4bddb7aec352/hapi-fhir-utilities/src/main/java/org/hl7/fhir/utilities/cache/NpmPackage.java#L217-L222 |
22,618 | jamesagnew/hapi-fhir | hapi-fhir-jpaserver-model/src/main/java/ca/uhn/fhir/jpa/model/entity/BaseResourceIndexedSearchParam.java | BaseResourceIndexedSearchParam.hash | static long hash(String... theValues) {
Hasher hasher = HASH_FUNCTION.newHasher();
for (String next : theValues) {
if (next == null) {
hasher.putByte((byte) 0);
} else {
next = UrlUtil.escapeUrlParam(next);
byte[] bytes = next.getBytes(Charsets.UTF_8);
hasher.putBytes(bytes);
}
hasher.p... | java | static long hash(String... theValues) {
Hasher hasher = HASH_FUNCTION.newHasher();
for (String next : theValues) {
if (next == null) {
hasher.putByte((byte) 0);
} else {
next = UrlUtil.escapeUrlParam(next);
byte[] bytes = next.getBytes(Charsets.UTF_8);
hasher.putBytes(bytes);
}
hasher.p... | [
"static",
"long",
"hash",
"(",
"String",
"...",
"theValues",
")",
"{",
"Hasher",
"hasher",
"=",
"HASH_FUNCTION",
".",
"newHasher",
"(",
")",
";",
"for",
"(",
"String",
"next",
":",
"theValues",
")",
"{",
"if",
"(",
"next",
"==",
"null",
")",
"{",
"ha... | Applies a fast and consistent hashing algorithm to a set of strings | [
"Applies",
"a",
"fast",
"and",
"consistent",
"hashing",
"algorithm",
"to",
"a",
"set",
"of",
"strings"
] | 150a84d52fe691b7f48fcb28247c4bddb7aec352 | https://github.com/jamesagnew/hapi-fhir/blob/150a84d52fe691b7f48fcb28247c4bddb7aec352/hapi-fhir-jpaserver-model/src/main/java/ca/uhn/fhir/jpa/model/entity/BaseResourceIndexedSearchParam.java#L139-L155 |
22,619 | jamesagnew/hapi-fhir | hapi-fhir-jpaserver-base/src/main/java/ca/uhn/fhir/jpa/term/TranslationRequest.java | TranslationRequest.addCode | public TranslationRequest addCode(String theSystem, String theCode) {
Validate.notBlank(theSystem, "theSystem must not be null");
Validate.notBlank(theCode, "theCode must not be null");
if (getCodeableConcept() == null) {
setCodeableConcept(new CodeableConcept());
}
getCodeableConcept().addCoding(new Codin... | java | public TranslationRequest addCode(String theSystem, String theCode) {
Validate.notBlank(theSystem, "theSystem must not be null");
Validate.notBlank(theCode, "theCode must not be null");
if (getCodeableConcept() == null) {
setCodeableConcept(new CodeableConcept());
}
getCodeableConcept().addCoding(new Codin... | [
"public",
"TranslationRequest",
"addCode",
"(",
"String",
"theSystem",
",",
"String",
"theCode",
")",
"{",
"Validate",
".",
"notBlank",
"(",
"theSystem",
",",
"\"theSystem must not be null\"",
")",
";",
"Validate",
".",
"notBlank",
"(",
"theCode",
",",
"\"theCode ... | This is just a convenience method that creates a codeableconcept if one
doesn't already exist, and adds a coding to it | [
"This",
"is",
"just",
"a",
"convenience",
"method",
"that",
"creates",
"a",
"codeableconcept",
"if",
"one",
"doesn",
"t",
"already",
"exist",
"and",
"adds",
"a",
"coding",
"to",
"it"
] | 150a84d52fe691b7f48fcb28247c4bddb7aec352 | https://github.com/jamesagnew/hapi-fhir/blob/150a84d52fe691b7f48fcb28247c4bddb7aec352/hapi-fhir-jpaserver-base/src/main/java/ca/uhn/fhir/jpa/term/TranslationRequest.java#L50-L58 |
22,620 | jamesagnew/hapi-fhir | hapi-fhir-base/src/main/java/ca/uhn/fhir/context/FhirContext.java | FhirContext.getResourceNames | public Set<String> getResourceNames() {
Set<String> resourceNames = new HashSet<>();
if (myNameToResourceDefinition.isEmpty()) {
Properties props = new Properties();
try {
props.load(myVersion.getFhirVersionPropertiesFile());
} catch (IOException theE) {
throw new ConfigurationException("Failed to... | java | public Set<String> getResourceNames() {
Set<String> resourceNames = new HashSet<>();
if (myNameToResourceDefinition.isEmpty()) {
Properties props = new Properties();
try {
props.load(myVersion.getFhirVersionPropertiesFile());
} catch (IOException theE) {
throw new ConfigurationException("Failed to... | [
"public",
"Set",
"<",
"String",
">",
"getResourceNames",
"(",
")",
"{",
"Set",
"<",
"String",
">",
"resourceNames",
"=",
"new",
"HashSet",
"<>",
"(",
")",
";",
"if",
"(",
"myNameToResourceDefinition",
".",
"isEmpty",
"(",
")",
")",
"{",
"Properties",
"pr... | Returns an unmodifiable set containing all resource names known to this
context | [
"Returns",
"an",
"unmodifiable",
"set",
"containing",
"all",
"resource",
"names",
"known",
"to",
"this",
"context"
] | 150a84d52fe691b7f48fcb28247c4bddb7aec352 | https://github.com/jamesagnew/hapi-fhir/blob/150a84d52fe691b7f48fcb28247c4bddb7aec352/hapi-fhir-base/src/main/java/ca/uhn/fhir/context/FhirContext.java#L491-L515 |
22,621 | jamesagnew/hapi-fhir | hapi-fhir-base/src/main/java/ca/uhn/fhir/context/FhirContext.java | FhirContext.getRestfulClientFactory | public IRestfulClientFactory getRestfulClientFactory() {
if (myRestfulClientFactory == null) {
try {
myRestfulClientFactory = (IRestfulClientFactory) ReflectionUtil.newInstance(Class.forName("ca.uhn.fhir.rest.client.apache.ApacheRestfulClientFactory"), FhirContext.class, this);
} catch (ClassNotFoundExcepti... | java | public IRestfulClientFactory getRestfulClientFactory() {
if (myRestfulClientFactory == null) {
try {
myRestfulClientFactory = (IRestfulClientFactory) ReflectionUtil.newInstance(Class.forName("ca.uhn.fhir.rest.client.apache.ApacheRestfulClientFactory"), FhirContext.class, this);
} catch (ClassNotFoundExcepti... | [
"public",
"IRestfulClientFactory",
"getRestfulClientFactory",
"(",
")",
"{",
"if",
"(",
"myRestfulClientFactory",
"==",
"null",
")",
"{",
"try",
"{",
"myRestfulClientFactory",
"=",
"(",
"IRestfulClientFactory",
")",
"ReflectionUtil",
".",
"newInstance",
"(",
"Class",
... | Get the restful client factory. If no factory has been set, this will be initialized with
a new ApacheRestfulClientFactory.
@return the factory used to create the restful clients | [
"Get",
"the",
"restful",
"client",
"factory",
".",
"If",
"no",
"factory",
"has",
"been",
"set",
"this",
"will",
"be",
"initialized",
"with",
"a",
"new",
"ApacheRestfulClientFactory",
"."
] | 150a84d52fe691b7f48fcb28247c4bddb7aec352 | https://github.com/jamesagnew/hapi-fhir/blob/150a84d52fe691b7f48fcb28247c4bddb7aec352/hapi-fhir-base/src/main/java/ca/uhn/fhir/context/FhirContext.java#L523-L532 |
22,622 | jamesagnew/hapi-fhir | hapi-fhir-base/src/main/java/ca/uhn/fhir/interceptor/api/HookParams.java | HookParams.getParamsForType | public ListMultimap<Class<?>, Object> getParamsForType() {
ArrayListMultimap<Class<?>, Object> retVal = ArrayListMultimap.create();
myParams.entries().forEach(entry -> retVal.put(entry.getKey(), unwrapValue(entry.getValue())));
return Multimaps.unmodifiableListMultimap(retVal);
} | java | public ListMultimap<Class<?>, Object> getParamsForType() {
ArrayListMultimap<Class<?>, Object> retVal = ArrayListMultimap.create();
myParams.entries().forEach(entry -> retVal.put(entry.getKey(), unwrapValue(entry.getValue())));
return Multimaps.unmodifiableListMultimap(retVal);
} | [
"public",
"ListMultimap",
"<",
"Class",
"<",
"?",
">",
",",
"Object",
">",
"getParamsForType",
"(",
")",
"{",
"ArrayListMultimap",
"<",
"Class",
"<",
"?",
">",
",",
"Object",
">",
"retVal",
"=",
"ArrayListMultimap",
".",
"create",
"(",
")",
";",
"myParam... | Returns an unmodifiable multimap of the params, where the
key is the param type and the value is the actual instance | [
"Returns",
"an",
"unmodifiable",
"multimap",
"of",
"the",
"params",
"where",
"the",
"key",
"is",
"the",
"param",
"type",
"and",
"the",
"value",
"is",
"the",
"actual",
"instance"
] | 150a84d52fe691b7f48fcb28247c4bddb7aec352 | https://github.com/jamesagnew/hapi-fhir/blob/150a84d52fe691b7f48fcb28247c4bddb7aec352/hapi-fhir-base/src/main/java/ca/uhn/fhir/interceptor/api/HookParams.java#L107-L111 |
22,623 | jamesagnew/hapi-fhir | hapi-fhir-server/src/main/java/ca/uhn/fhir/rest/server/method/HistoryMethodBinding.java | HistoryMethodBinding.incomingServerRequestMatchesMethod | @Override
public boolean incomingServerRequestMatchesMethod(RequestDetails theRequest) {
if (!Constants.PARAM_HISTORY.equals(theRequest.getOperation())) {
return false;
}
if (theRequest.getResourceName() == null) {
return myResourceOperationType == RestOperationTypeEnum.HISTORY_SYSTEM;
}
if (!StringUti... | java | @Override
public boolean incomingServerRequestMatchesMethod(RequestDetails theRequest) {
if (!Constants.PARAM_HISTORY.equals(theRequest.getOperation())) {
return false;
}
if (theRequest.getResourceName() == null) {
return myResourceOperationType == RestOperationTypeEnum.HISTORY_SYSTEM;
}
if (!StringUti... | [
"@",
"Override",
"public",
"boolean",
"incomingServerRequestMatchesMethod",
"(",
"RequestDetails",
"theRequest",
")",
"{",
"if",
"(",
"!",
"Constants",
".",
"PARAM_HISTORY",
".",
"equals",
"(",
"theRequest",
".",
"getOperation",
"(",
")",
")",
")",
"{",
"return"... | ObjectUtils.equals is replaced by a JDK7 method.. | [
"ObjectUtils",
".",
"equals",
"is",
"replaced",
"by",
"a",
"JDK7",
"method",
".."
] | 150a84d52fe691b7f48fcb28247c4bddb7aec352 | https://github.com/jamesagnew/hapi-fhir/blob/150a84d52fe691b7f48fcb28247c4bddb7aec352/hapi-fhir-server/src/main/java/ca/uhn/fhir/rest/server/method/HistoryMethodBinding.java#L107-L132 |
22,624 | jamesagnew/hapi-fhir | hapi-fhir-base/src/main/java/ca/uhn/fhir/rest/server/exceptions/BaseServerResponseException.java | BaseServerResponseException.addResponseHeader | public BaseServerResponseException addResponseHeader(String theName, String theValue) {
Validate.notBlank(theName, "theName must not be null or empty");
Validate.notBlank(theValue, "theValue must not be null or empty");
if (getResponseHeaders().containsKey(theName) == false) {
getResponseHeaders().put(theName,... | java | public BaseServerResponseException addResponseHeader(String theName, String theValue) {
Validate.notBlank(theName, "theName must not be null or empty");
Validate.notBlank(theValue, "theValue must not be null or empty");
if (getResponseHeaders().containsKey(theName) == false) {
getResponseHeaders().put(theName,... | [
"public",
"BaseServerResponseException",
"addResponseHeader",
"(",
"String",
"theName",
",",
"String",
"theValue",
")",
"{",
"Validate",
".",
"notBlank",
"(",
"theName",
",",
"\"theName must not be null or empty\"",
")",
";",
"Validate",
".",
"notBlank",
"(",
"theValu... | Add a header which will be added to any responses
@param theName The header name
@param theValue The header value
@return Returns a reference to <code>this</code> for easy method chaining
@since 2.0 | [
"Add",
"a",
"header",
"which",
"will",
"be",
"added",
"to",
"any",
"responses"
] | 150a84d52fe691b7f48fcb28247c4bddb7aec352 | https://github.com/jamesagnew/hapi-fhir/blob/150a84d52fe691b7f48fcb28247c4bddb7aec352/hapi-fhir-base/src/main/java/ca/uhn/fhir/rest/server/exceptions/BaseServerResponseException.java#L193-L201 |
22,625 | jamesagnew/hapi-fhir | hapi-fhir-jaxrsserver-base/src/main/java/ca/uhn/fhir/jaxrs/server/AbstractJaxRsBundleProvider.java | AbstractJaxRsBundleProvider.create | @POST
public Response create(final String resource)
throws IOException {
return execute(getRequest(RequestTypeEnum.POST, RestOperationTypeEnum.TRANSACTION).resource(resource));
} | java | @POST
public Response create(final String resource)
throws IOException {
return execute(getRequest(RequestTypeEnum.POST, RestOperationTypeEnum.TRANSACTION).resource(resource));
} | [
"@",
"POST",
"public",
"Response",
"create",
"(",
"final",
"String",
"resource",
")",
"throws",
"IOException",
"{",
"return",
"execute",
"(",
"getRequest",
"(",
"RequestTypeEnum",
".",
"POST",
",",
"RestOperationTypeEnum",
".",
"TRANSACTION",
")",
".",
"resource... | Create all resources in one transaction
@param resource the body of the post method containing the bundle of the resources being created in a xml/json form
@return the response
@see <a href="https://www.hl7.org/fhir/http.html#create">https://www.hl7. org/fhir/http.html#create</a> | [
"Create",
"all",
"resources",
"in",
"one",
"transaction"
] | 150a84d52fe691b7f48fcb28247c4bddb7aec352 | https://github.com/jamesagnew/hapi-fhir/blob/150a84d52fe691b7f48fcb28247c4bddb7aec352/hapi-fhir-jaxrsserver-base/src/main/java/ca/uhn/fhir/jaxrs/server/AbstractJaxRsBundleProvider.java#L97-L101 |
22,626 | jamesagnew/hapi-fhir | hapi-fhir-jpaserver-base/src/main/java/ca/uhn/fhir/jpa/subscription/SubscriptionTriggeringSvcImpl.java | SubscriptionTriggeringSvcImpl.setMaxSubmitPerPass | public void setMaxSubmitPerPass(Integer theMaxSubmitPerPass) {
Integer maxSubmitPerPass = theMaxSubmitPerPass;
if (maxSubmitPerPass == null) {
maxSubmitPerPass = DEFAULT_MAX_SUBMIT;
}
Validate.isTrue(maxSubmitPerPass > 0, "theMaxSubmitPerPass must be > 0");
myMaxSubmitPerPass = maxSubmitPerPass;
} | java | public void setMaxSubmitPerPass(Integer theMaxSubmitPerPass) {
Integer maxSubmitPerPass = theMaxSubmitPerPass;
if (maxSubmitPerPass == null) {
maxSubmitPerPass = DEFAULT_MAX_SUBMIT;
}
Validate.isTrue(maxSubmitPerPass > 0, "theMaxSubmitPerPass must be > 0");
myMaxSubmitPerPass = maxSubmitPerPass;
} | [
"public",
"void",
"setMaxSubmitPerPass",
"(",
"Integer",
"theMaxSubmitPerPass",
")",
"{",
"Integer",
"maxSubmitPerPass",
"=",
"theMaxSubmitPerPass",
";",
"if",
"(",
"maxSubmitPerPass",
"==",
"null",
")",
"{",
"maxSubmitPerPass",
"=",
"DEFAULT_MAX_SUBMIT",
";",
"}",
... | Sets the maximum number of resources that will be submitted in a single pass | [
"Sets",
"the",
"maximum",
"number",
"of",
"resources",
"that",
"will",
"be",
"submitted",
"in",
"a",
"single",
"pass"
] | 150a84d52fe691b7f48fcb28247c4bddb7aec352 | https://github.com/jamesagnew/hapi-fhir/blob/150a84d52fe691b7f48fcb28247c4bddb7aec352/hapi-fhir-jpaserver-base/src/main/java/ca/uhn/fhir/jpa/subscription/SubscriptionTriggeringSvcImpl.java#L334-L341 |
22,627 | jamesagnew/hapi-fhir | hapi-fhir-narrativegenerator/src/main/java/ca/uhn/fhir/narrative/template/filters/Filter.java | Filter.checkParams | public final void checkParams(Object[] params, int expected) {
if(params == null || params.length != expected) {
throw new RuntimeException("Liquid error: wrong number of arguments (" +
(params == null ? 0 : params.length + 1) + " for " + (expected + 1) + ")");
}
} | java | public final void checkParams(Object[] params, int expected) {
if(params == null || params.length != expected) {
throw new RuntimeException("Liquid error: wrong number of arguments (" +
(params == null ? 0 : params.length + 1) + " for " + (expected + 1) + ")");
}
} | [
"public",
"final",
"void",
"checkParams",
"(",
"Object",
"[",
"]",
"params",
",",
"int",
"expected",
")",
"{",
"if",
"(",
"params",
"==",
"null",
"||",
"params",
".",
"length",
"!=",
"expected",
")",
"{",
"throw",
"new",
"RuntimeException",
"(",
"\"Liqui... | Check the number of parameters and throws an exception if needed.
@param params
the parameters to check.
@param expected
the expected number of parameters. | [
"Check",
"the",
"number",
"of",
"parameters",
"and",
"throws",
"an",
"exception",
"if",
"needed",
"."
] | 150a84d52fe691b7f48fcb28247c4bddb7aec352 | https://github.com/jamesagnew/hapi-fhir/blob/150a84d52fe691b7f48fcb28247c4bddb7aec352/hapi-fhir-narrativegenerator/src/main/java/ca/uhn/fhir/narrative/template/filters/Filter.java#L102-L107 |
22,628 | jamesagnew/hapi-fhir | hapi-fhir-narrativegenerator/src/main/java/ca/uhn/fhir/narrative/template/filters/Filter.java | Filter.get | protected Object get(int index, Object... params) {
if (index >= params.length) {
throw new RuntimeException("error in filter '" + name +
"': cannot get param index: " + index +
" from: " + Arrays.toString(params));
}
return params[index];
... | java | protected Object get(int index, Object... params) {
if (index >= params.length) {
throw new RuntimeException("error in filter '" + name +
"': cannot get param index: " + index +
" from: " + Arrays.toString(params));
}
return params[index];
... | [
"protected",
"Object",
"get",
"(",
"int",
"index",
",",
"Object",
"...",
"params",
")",
"{",
"if",
"(",
"index",
">=",
"params",
".",
"length",
")",
"{",
"throw",
"new",
"RuntimeException",
"(",
"\"error in filter '\"",
"+",
"name",
"+",
"\"': cannot get par... | Returns a value at a specific index from an array of parameters.
If no such index exists, a RuntimeException is thrown.
@param index
the index of the value to be retrieved.
@param params
the values.
@return a value at a specific index from an array of
parameters. | [
"Returns",
"a",
"value",
"at",
"a",
"specific",
"index",
"from",
"an",
"array",
"of",
"parameters",
".",
"If",
"no",
"such",
"index",
"exists",
"a",
"RuntimeException",
"is",
"thrown",
"."
] | 150a84d52fe691b7f48fcb28247c4bddb7aec352 | https://github.com/jamesagnew/hapi-fhir/blob/150a84d52fe691b7f48fcb28247c4bddb7aec352/hapi-fhir-narrativegenerator/src/main/java/ca/uhn/fhir/narrative/template/filters/Filter.java#L121-L130 |
22,629 | jamesagnew/hapi-fhir | hapi-fhir-jpaserver-base/src/main/java/ca/uhn/fhir/jpa/dao/index/SearchParamWithInlineReferencesExtractor.java | SearchParamWithInlineReferencesExtractor.extractInlineReferences | public void extractInlineReferences(IBaseResource theResource) {
if (!myDaoConfig.isAllowInlineMatchUrlReferences()) {
return;
}
FhirTerser terser = myContext.newTerser();
List<IBaseReference> allRefs = terser.getAllPopulatedChildElementsOfType(theResource, IBaseReference.class);
for (IBaseReference nextRe... | java | public void extractInlineReferences(IBaseResource theResource) {
if (!myDaoConfig.isAllowInlineMatchUrlReferences()) {
return;
}
FhirTerser terser = myContext.newTerser();
List<IBaseReference> allRefs = terser.getAllPopulatedChildElementsOfType(theResource, IBaseReference.class);
for (IBaseReference nextRe... | [
"public",
"void",
"extractInlineReferences",
"(",
"IBaseResource",
"theResource",
")",
"{",
"if",
"(",
"!",
"myDaoConfig",
".",
"isAllowInlineMatchUrlReferences",
"(",
")",
")",
"{",
"return",
";",
"}",
"FhirTerser",
"terser",
"=",
"myContext",
".",
"newTerser",
... | Handle references within the resource that are match URLs, for example references like "Patient?identifier=foo". These match URLs are resolved and replaced with the ID of the
matching resource. | [
"Handle",
"references",
"within",
"the",
"resource",
"that",
"are",
"match",
"URLs",
"for",
"example",
"references",
"like",
"Patient?identifier",
"=",
"foo",
".",
"These",
"match",
"URLs",
"are",
"resolved",
"and",
"replaced",
"with",
"the",
"ID",
"of",
"the"... | 150a84d52fe691b7f48fcb28247c4bddb7aec352 | https://github.com/jamesagnew/hapi-fhir/blob/150a84d52fe691b7f48fcb28247c4bddb7aec352/hapi-fhir-jpaserver-base/src/main/java/ca/uhn/fhir/jpa/dao/index/SearchParamWithInlineReferencesExtractor.java#L209-L255 |
22,630 | scribejava/scribejava | scribejava-core/src/main/java/com/github/scribejava/core/oauth/OAuth20Service.java | OAuth20Service.getAccessTokenClientCredentialsGrant | public Future<OAuth2AccessToken> getAccessTokenClientCredentialsGrant(
OAuthAsyncRequestCallback<OAuth2AccessToken> callback) {
final OAuthRequest request = createAccessTokenClientCredentialsGrantRequest(null);
return sendAccessTokenRequestAsync(request, callback);
} | java | public Future<OAuth2AccessToken> getAccessTokenClientCredentialsGrant(
OAuthAsyncRequestCallback<OAuth2AccessToken> callback) {
final OAuthRequest request = createAccessTokenClientCredentialsGrantRequest(null);
return sendAccessTokenRequestAsync(request, callback);
} | [
"public",
"Future",
"<",
"OAuth2AccessToken",
">",
"getAccessTokenClientCredentialsGrant",
"(",
"OAuthAsyncRequestCallback",
"<",
"OAuth2AccessToken",
">",
"callback",
")",
"{",
"final",
"OAuthRequest",
"request",
"=",
"createAccessTokenClientCredentialsGrantRequest",
"(",
"n... | Start the request to retrieve the access token using client-credentials grant. The optionally provided callback
will be called with the Token when it is available.
@param callback optional callback
@return Future | [
"Start",
"the",
"request",
"to",
"retrieve",
"the",
"access",
"token",
"using",
"client",
"-",
"credentials",
"grant",
".",
"The",
"optionally",
"provided",
"callback",
"will",
"be",
"called",
"with",
"the",
"Token",
"when",
"it",
"is",
"available",
"."
] | 030d76872fe371a84b5d05c6c3c33c34e8f611f1 | https://github.com/scribejava/scribejava/blob/030d76872fe371a84b5d05c6c3c33c34e8f611f1/scribejava-core/src/main/java/com/github/scribejava/core/oauth/OAuth20Service.java#L266-L271 |
22,631 | scribejava/scribejava | scribejava-core/src/main/java/com/github/scribejava/core/model/OAuthRequest.java | OAuthRequest.addOAuthParameter | public void addOAuthParameter(String key, String value) {
oauthParameters.put(checkKey(key), value);
} | java | public void addOAuthParameter(String key, String value) {
oauthParameters.put(checkKey(key), value);
} | [
"public",
"void",
"addOAuthParameter",
"(",
"String",
"key",
",",
"String",
"value",
")",
"{",
"oauthParameters",
".",
"put",
"(",
"checkKey",
"(",
"key",
")",
",",
"value",
")",
";",
"}"
] | Adds an OAuth parameter.
@param key name of the parameter
@param value value of the parameter
@throws IllegalArgumentException if the parameter is not an OAuth parameter | [
"Adds",
"an",
"OAuth",
"parameter",
"."
] | 030d76872fe371a84b5d05c6c3c33c34e8f611f1 | https://github.com/scribejava/scribejava/blob/030d76872fe371a84b5d05c6c3c33c34e8f611f1/scribejava-core/src/main/java/com/github/scribejava/core/model/OAuthRequest.java#L58-L60 |
22,632 | scribejava/scribejava | scribejava-core/src/main/java/com/github/scribejava/core/model/OAuthRequest.java | OAuthRequest.getSanitizedUrl | public String getSanitizedUrl() {
if (url.startsWith("http://") && (url.endsWith(":80") || url.contains(":80/"))) {
return url.replaceAll("\\?.*", "").replaceAll(":80", "");
} else if (url.startsWith("https://") && (url.endsWith(":443") || url.contains(":443/"))) {
return url.rep... | java | public String getSanitizedUrl() {
if (url.startsWith("http://") && (url.endsWith(":80") || url.contains(":80/"))) {
return url.replaceAll("\\?.*", "").replaceAll(":80", "");
} else if (url.startsWith("https://") && (url.endsWith(":443") || url.contains(":443/"))) {
return url.rep... | [
"public",
"String",
"getSanitizedUrl",
"(",
")",
"{",
"if",
"(",
"url",
".",
"startsWith",
"(",
"\"http://\"",
")",
"&&",
"(",
"url",
".",
"endsWith",
"(",
"\":80\"",
")",
"||",
"url",
".",
"contains",
"(",
"\":80/\"",
")",
")",
")",
"{",
"return",
"... | Returns the URL without the port and the query string part.
@return the OAuth-sanitized URL | [
"Returns",
"the",
"URL",
"without",
"the",
"port",
"and",
"the",
"query",
"string",
"part",
"."
] | 030d76872fe371a84b5d05c6c3c33c34e8f611f1 | https://github.com/scribejava/scribejava/blob/030d76872fe371a84b5d05c6c3c33c34e8f611f1/scribejava-core/src/main/java/com/github/scribejava/core/model/OAuthRequest.java#L336-L344 |
22,633 | scribejava/scribejava | scribejava-core/src/main/java/com/github/scribejava/core/utils/StreamUtils.java | StreamUtils.getStreamContents | public static String getStreamContents(InputStream is) throws IOException {
Preconditions.checkNotNull(is, "Cannot get String from a null object");
final char[] buffer = new char[0x10000];
final StringBuilder out = new StringBuilder();
try (Reader in = new InputStreamReader(is, "UTF-8"))... | java | public static String getStreamContents(InputStream is) throws IOException {
Preconditions.checkNotNull(is, "Cannot get String from a null object");
final char[] buffer = new char[0x10000];
final StringBuilder out = new StringBuilder();
try (Reader in = new InputStreamReader(is, "UTF-8"))... | [
"public",
"static",
"String",
"getStreamContents",
"(",
"InputStream",
"is",
")",
"throws",
"IOException",
"{",
"Preconditions",
".",
"checkNotNull",
"(",
"is",
",",
"\"Cannot get String from a null object\"",
")",
";",
"final",
"char",
"[",
"]",
"buffer",
"=",
"n... | Returns the stream contents as an UTF-8 encoded string
@param is input stream
@return string contents
@throws java.io.IOException in any. SocketTimeout in example | [
"Returns",
"the",
"stream",
"contents",
"as",
"an",
"UTF",
"-",
"8",
"encoded",
"string"
] | 030d76872fe371a84b5d05c6c3c33c34e8f611f1 | https://github.com/scribejava/scribejava/blob/030d76872fe371a84b5d05c6c3c33c34e8f611f1/scribejava-core/src/main/java/com/github/scribejava/core/utils/StreamUtils.java#L21-L35 |
22,634 | scribejava/scribejava | scribejava-core/src/main/java/com/github/scribejava/core/utils/StreamUtils.java | StreamUtils.getGzipStreamContents | public static String getGzipStreamContents(InputStream is) throws IOException {
Preconditions.checkNotNull(is, "Cannot get String from a null object");
final GZIPInputStream gis = new GZIPInputStream(is);
return getStreamContents(gis);
} | java | public static String getGzipStreamContents(InputStream is) throws IOException {
Preconditions.checkNotNull(is, "Cannot get String from a null object");
final GZIPInputStream gis = new GZIPInputStream(is);
return getStreamContents(gis);
} | [
"public",
"static",
"String",
"getGzipStreamContents",
"(",
"InputStream",
"is",
")",
"throws",
"IOException",
"{",
"Preconditions",
".",
"checkNotNull",
"(",
"is",
",",
"\"Cannot get String from a null object\"",
")",
";",
"final",
"GZIPInputStream",
"gis",
"=",
"new... | Return String content from a gzip stream
@param is input stream
@return string contents
@throws java.io.IOException in any. SocketTimeout in example | [
"Return",
"String",
"content",
"from",
"a",
"gzip",
"stream"
] | 030d76872fe371a84b5d05c6c3c33c34e8f611f1 | https://github.com/scribejava/scribejava/blob/030d76872fe371a84b5d05c6c3c33c34e8f611f1/scribejava-core/src/main/java/com/github/scribejava/core/utils/StreamUtils.java#L44-L48 |
22,635 | spotify/docker-maven-plugin | src/main/java/com/spotify/docker/Utils.java | Utils.pushImageTag | public static void pushImageTag(DockerClient docker, String imageName,
List<String> imageTags, Log log, boolean skipPush)
throws MojoExecutionException, DockerException, IOException, InterruptedException {
if (skipPush) {
log.info("Skipping docker push");
return;
... | java | public static void pushImageTag(DockerClient docker, String imageName,
List<String> imageTags, Log log, boolean skipPush)
throws MojoExecutionException, DockerException, IOException, InterruptedException {
if (skipPush) {
log.info("Skipping docker push");
return;
... | [
"public",
"static",
"void",
"pushImageTag",
"(",
"DockerClient",
"docker",
",",
"String",
"imageName",
",",
"List",
"<",
"String",
">",
"imageTags",
",",
"Log",
"log",
",",
"boolean",
"skipPush",
")",
"throws",
"MojoExecutionException",
",",
"DockerException",
"... | push just the tags listed in the pom rather than all images using imageName | [
"push",
"just",
"the",
"tags",
"listed",
"in",
"the",
"pom",
"rather",
"than",
"all",
"images",
"using",
"imageName"
] | c5bbc1c4993f5dc37c96457fa5de5af8308f7829 | https://github.com/spotify/docker-maven-plugin/blob/c5bbc1c4993f5dc37c96457fa5de5af8308f7829/src/main/java/com/spotify/docker/Utils.java#L134-L154 |
22,636 | spotify/docker-maven-plugin | src/main/java/com/spotify/docker/AbstractDockerMojo.java | AbstractDockerMojo.registryAuth | protected RegistryAuth registryAuth() throws MojoExecutionException {
if (settings != null && serverId != null) {
final Server server = settings.getServer(serverId);
if (server != null) {
final RegistryAuth.Builder registryAuthBuilder = RegistryAuth.builder();
final String username = se... | java | protected RegistryAuth registryAuth() throws MojoExecutionException {
if (settings != null && serverId != null) {
final Server server = settings.getServer(serverId);
if (server != null) {
final RegistryAuth.Builder registryAuthBuilder = RegistryAuth.builder();
final String username = se... | [
"protected",
"RegistryAuth",
"registryAuth",
"(",
")",
"throws",
"MojoExecutionException",
"{",
"if",
"(",
"settings",
"!=",
"null",
"&&",
"serverId",
"!=",
"null",
")",
"{",
"final",
"Server",
"server",
"=",
"settings",
".",
"getServer",
"(",
"serverId",
")",... | Builds the registryAuth object from server details.
@return {@link RegistryAuth}
@throws MojoExecutionException | [
"Builds",
"the",
"registryAuth",
"object",
"from",
"server",
"details",
"."
] | c5bbc1c4993f5dc37c96457fa5de5af8308f7829 | https://github.com/spotify/docker-maven-plugin/blob/c5bbc1c4993f5dc37c96457fa5de5af8308f7829/src/main/java/com/spotify/docker/AbstractDockerMojo.java#L239-L277 |
22,637 | uber/AutoDispose | autodispose/src/main/java/com/uber/autodispose/AutoDisposeEndConsumerHelper.java | AutoDisposeEndConsumerHelper.setOnce | public static boolean setOnce(AtomicReference<Disposable> upstream, Disposable next, Class<?> observer) {
AutoDisposeUtil.checkNotNull(next, "next is null");
if (!upstream.compareAndSet(null, next)) {
next.dispose();
if (upstream.get() != AutoDisposableHelper.DISPOSED) {
reportDoubleSubscrip... | java | public static boolean setOnce(AtomicReference<Disposable> upstream, Disposable next, Class<?> observer) {
AutoDisposeUtil.checkNotNull(next, "next is null");
if (!upstream.compareAndSet(null, next)) {
next.dispose();
if (upstream.get() != AutoDisposableHelper.DISPOSED) {
reportDoubleSubscrip... | [
"public",
"static",
"boolean",
"setOnce",
"(",
"AtomicReference",
"<",
"Disposable",
">",
"upstream",
",",
"Disposable",
"next",
",",
"Class",
"<",
"?",
">",
"observer",
")",
"{",
"AutoDisposeUtil",
".",
"checkNotNull",
"(",
"next",
",",
"\"next is null\"",
")... | Atomically updates the target upstream AtomicReference from null to the non-null
next Disposable, otherwise disposes next and reports a ProtocolViolationException
if the AtomicReference doesn't contain the shared disposed indicator.
@param upstream the target AtomicReference to update
@param next the Disposable to set... | [
"Atomically",
"updates",
"the",
"target",
"upstream",
"AtomicReference",
"from",
"null",
"to",
"the",
"non",
"-",
"null",
"next",
"Disposable",
"otherwise",
"disposes",
"next",
"and",
"reports",
"a",
"ProtocolViolationException",
"if",
"the",
"AtomicReference",
"doe... | 1115b0274f7960354289bb3ae7ba75b0c5a47457 | https://github.com/uber/AutoDispose/blob/1115b0274f7960354289bb3ae7ba75b0c5a47457/autodispose/src/main/java/com/uber/autodispose/AutoDisposeEndConsumerHelper.java#L50-L60 |
22,638 | uber/AutoDispose | autodispose/src/main/java/com/uber/autodispose/AutoDisposeEndConsumerHelper.java | AutoDisposeEndConsumerHelper.setOnce | public static boolean setOnce(AtomicReference<Subscription> upstream, Subscription next, Class<?> subscriber) {
AutoDisposeUtil.checkNotNull(next, "next is null");
if (!upstream.compareAndSet(null, next)) {
next.cancel();
if (upstream.get() != AutoSubscriptionHelper.CANCELLED) {
reportDouble... | java | public static boolean setOnce(AtomicReference<Subscription> upstream, Subscription next, Class<?> subscriber) {
AutoDisposeUtil.checkNotNull(next, "next is null");
if (!upstream.compareAndSet(null, next)) {
next.cancel();
if (upstream.get() != AutoSubscriptionHelper.CANCELLED) {
reportDouble... | [
"public",
"static",
"boolean",
"setOnce",
"(",
"AtomicReference",
"<",
"Subscription",
">",
"upstream",
",",
"Subscription",
"next",
",",
"Class",
"<",
"?",
">",
"subscriber",
")",
"{",
"AutoDisposeUtil",
".",
"checkNotNull",
"(",
"next",
",",
"\"next is null\""... | Atomically updates the target upstream AtomicReference from null to the non-null
next Subscription, otherwise cancels next and reports a ProtocolViolationException
if the AtomicReference doesn't contain the shared cancelled indicator.
@param upstream the target AtomicReference to update
@param next the Subscription to... | [
"Atomically",
"updates",
"the",
"target",
"upstream",
"AtomicReference",
"from",
"null",
"to",
"the",
"non",
"-",
"null",
"next",
"Subscription",
"otherwise",
"cancels",
"next",
"and",
"reports",
"a",
"ProtocolViolationException",
"if",
"the",
"AtomicReference",
"do... | 1115b0274f7960354289bb3ae7ba75b0c5a47457 | https://github.com/uber/AutoDispose/blob/1115b0274f7960354289bb3ae7ba75b0c5a47457/autodispose/src/main/java/com/uber/autodispose/AutoDisposeEndConsumerHelper.java#L73-L83 |
22,639 | uber/AutoDispose | lifecycle/autodispose-lifecycle/src/main/java/com/uber/autodispose/lifecycle/LifecycleScopes.java | LifecycleScopes.resolveScopeFromLifecycle | public static <E> CompletableSource resolveScopeFromLifecycle(
final LifecycleScopeProvider<E> provider) throws OutsideScopeException {
return resolveScopeFromLifecycle(provider, true);
} | java | public static <E> CompletableSource resolveScopeFromLifecycle(
final LifecycleScopeProvider<E> provider) throws OutsideScopeException {
return resolveScopeFromLifecycle(provider, true);
} | [
"public",
"static",
"<",
"E",
">",
"CompletableSource",
"resolveScopeFromLifecycle",
"(",
"final",
"LifecycleScopeProvider",
"<",
"E",
">",
"provider",
")",
"throws",
"OutsideScopeException",
"{",
"return",
"resolveScopeFromLifecycle",
"(",
"provider",
",",
"true",
")... | Overload for resolving lifecycle providers that defaults to checking start and end boundaries
of lifecycles. That is, they will ensure that the lifecycle has both started and not ended.
<p><em>Note:</em> This resolves the scope immediately, so consider deferring execution as
needed, such as using {@link Completable#de... | [
"Overload",
"for",
"resolving",
"lifecycle",
"providers",
"that",
"defaults",
"to",
"checking",
"start",
"and",
"end",
"boundaries",
"of",
"lifecycles",
".",
"That",
"is",
"they",
"will",
"ensure",
"that",
"the",
"lifecycle",
"has",
"both",
"started",
"and",
"... | 1115b0274f7960354289bb3ae7ba75b0c5a47457 | https://github.com/uber/AutoDispose/blob/1115b0274f7960354289bb3ae7ba75b0c5a47457/lifecycle/autodispose-lifecycle/src/main/java/com/uber/autodispose/lifecycle/LifecycleScopes.java#L54-L57 |
22,640 | uber/AutoDispose | static-analysis/autodispose-error-prone/src/main/java/com/uber/autodispose/errorprone/AbstractReturnValueIgnored.java | AbstractReturnValueIgnored.describe | private Description describe(MethodInvocationTree methodInvocationTree, VisitorState state) {
// Find the root of the field access chain, i.e. a.intern().trim() ==> a.
ExpressionTree identifierExpr = ASTHelpers.getRootAssignable(methodInvocationTree);
String identifierStr = null;
Type identifierType = n... | java | private Description describe(MethodInvocationTree methodInvocationTree, VisitorState state) {
// Find the root of the field access chain, i.e. a.intern().trim() ==> a.
ExpressionTree identifierExpr = ASTHelpers.getRootAssignable(methodInvocationTree);
String identifierStr = null;
Type identifierType = n... | [
"private",
"Description",
"describe",
"(",
"MethodInvocationTree",
"methodInvocationTree",
",",
"VisitorState",
"state",
")",
"{",
"// Find the root of the field access chain, i.e. a.intern().trim() ==> a.",
"ExpressionTree",
"identifierExpr",
"=",
"ASTHelpers",
".",
"getRootAssign... | Fixes the error by assigning the result of the call to the receiver reference, or deleting the
method call. | [
"Fixes",
"the",
"error",
"by",
"assigning",
"the",
"result",
"of",
"the",
"call",
"to",
"the",
"receiver",
"reference",
"or",
"deleting",
"the",
"method",
"call",
"."
] | 1115b0274f7960354289bb3ae7ba75b0c5a47457 | https://github.com/uber/AutoDispose/blob/1115b0274f7960354289bb3ae7ba75b0c5a47457/static-analysis/autodispose-error-prone/src/main/java/com/uber/autodispose/errorprone/AbstractReturnValueIgnored.java#L262-L293 |
22,641 | uber/AutoDispose | autodispose/src/main/java/com/uber/autodispose/HalfSerializer.java | HalfSerializer.onNext | public static <T> boolean onNext(Subscriber<? super T> subscriber,
T value,
AtomicInteger wip,
AtomicThrowable error) {
if (wip.get() == 0 && wip.compareAndSet(0, 1)) {
subscriber.onNext(value);
if (wip.decrementAndGet() != 0) {
Throwable ex = error.terminate();
if (ex ... | java | public static <T> boolean onNext(Subscriber<? super T> subscriber,
T value,
AtomicInteger wip,
AtomicThrowable error) {
if (wip.get() == 0 && wip.compareAndSet(0, 1)) {
subscriber.onNext(value);
if (wip.decrementAndGet() != 0) {
Throwable ex = error.terminate();
if (ex ... | [
"public",
"static",
"<",
"T",
">",
"boolean",
"onNext",
"(",
"Subscriber",
"<",
"?",
"super",
"T",
">",
"subscriber",
",",
"T",
"value",
",",
"AtomicInteger",
"wip",
",",
"AtomicThrowable",
"error",
")",
"{",
"if",
"(",
"wip",
".",
"get",
"(",
")",
"... | Emits the given value if possible and terminates if there was an onComplete or onError
while emitting, drops the value otherwise.
@param <T> the value type
@param subscriber the target Subscriber to emit to
@param value the value to emit
@param wip the serialization work-in-progress counter/indicator
@param error the ... | [
"Emits",
"the",
"given",
"value",
"if",
"possible",
"and",
"terminates",
"if",
"there",
"was",
"an",
"onComplete",
"or",
"onError",
"while",
"emitting",
"drops",
"the",
"value",
"otherwise",
"."
] | 1115b0274f7960354289bb3ae7ba75b0c5a47457 | https://github.com/uber/AutoDispose/blob/1115b0274f7960354289bb3ae7ba75b0c5a47457/autodispose/src/main/java/com/uber/autodispose/HalfSerializer.java#L50-L67 |
22,642 | drewnoakes/metadata-extractor | Source/com/drew/metadata/Metadata.java | Metadata.containsDirectoryOfType | public boolean containsDirectoryOfType(Class<? extends Directory> type)
{
for (Directory dir : _directories) {
if (type.isAssignableFrom(dir.getClass()))
return true;
}
return false;
} | java | public boolean containsDirectoryOfType(Class<? extends Directory> type)
{
for (Directory dir : _directories) {
if (type.isAssignableFrom(dir.getClass()))
return true;
}
return false;
} | [
"public",
"boolean",
"containsDirectoryOfType",
"(",
"Class",
"<",
"?",
"extends",
"Directory",
">",
"type",
")",
"{",
"for",
"(",
"Directory",
"dir",
":",
"_directories",
")",
"{",
"if",
"(",
"type",
".",
"isAssignableFrom",
"(",
"dir",
".",
"getClass",
"... | Indicates whether an instance of the given directory type exists in this Metadata instance.
@param type the {@link Directory} type
@return <code>true</code> if a {@link Directory} of the specified type exists, otherwise <code>false</code> | [
"Indicates",
"whether",
"an",
"instance",
"of",
"the",
"given",
"directory",
"type",
"exists",
"in",
"this",
"Metadata",
"instance",
"."
] | a958e0b61b50e590731b3be1dca8df8e21ebd43c | https://github.com/drewnoakes/metadata-extractor/blob/a958e0b61b50e590731b3be1dca8df8e21ebd43c/Source/com/drew/metadata/Metadata.java#L113-L120 |
22,643 | drewnoakes/metadata-extractor | Source/com/drew/imaging/tiff/TiffReader.java | TiffReader.processTiff | public void processTiff(@NotNull final RandomAccessReader reader,
@NotNull final TiffHandler handler,
final int tiffHeaderOffset) throws TiffProcessingException, IOException
{
// This must be either "MM" or "II".
short byteOrderIdentifier = rea... | java | public void processTiff(@NotNull final RandomAccessReader reader,
@NotNull final TiffHandler handler,
final int tiffHeaderOffset) throws TiffProcessingException, IOException
{
// This must be either "MM" or "II".
short byteOrderIdentifier = rea... | [
"public",
"void",
"processTiff",
"(",
"@",
"NotNull",
"final",
"RandomAccessReader",
"reader",
",",
"@",
"NotNull",
"final",
"TiffHandler",
"handler",
",",
"final",
"int",
"tiffHeaderOffset",
")",
"throws",
"TiffProcessingException",
",",
"IOException",
"{",
"// Thi... | Processes a TIFF data sequence.
@param reader the {@link RandomAccessReader} from which the data should be read
@param handler the {@link TiffHandler} that will coordinate processing and accept read values
@param tiffHeaderOffset the offset within <code>reader</code> at which the TIFF header starts
@throws TiffProcess... | [
"Processes",
"a",
"TIFF",
"data",
"sequence",
"."
] | a958e0b61b50e590731b3be1dca8df8e21ebd43c | https://github.com/drewnoakes/metadata-extractor/blob/a958e0b61b50e590731b3be1dca8df8e21ebd43c/Source/com/drew/imaging/tiff/TiffReader.java#L48-L79 |
22,644 | drewnoakes/metadata-extractor | Source/com/drew/lang/ByteTrie.java | ByteTrie.addPath | public void addPath(T value, byte[]... parts)
{
int depth = 0;
ByteTrieNode<T> node = _root;
for (byte[] part : parts) {
for (byte b : part) {
ByteTrieNode<T> child = node._children.get(b);
if (child == null) {
child = new ByteT... | java | public void addPath(T value, byte[]... parts)
{
int depth = 0;
ByteTrieNode<T> node = _root;
for (byte[] part : parts) {
for (byte b : part) {
ByteTrieNode<T> child = node._children.get(b);
if (child == null) {
child = new ByteT... | [
"public",
"void",
"addPath",
"(",
"T",
"value",
",",
"byte",
"[",
"]",
"...",
"parts",
")",
"{",
"int",
"depth",
"=",
"0",
";",
"ByteTrieNode",
"<",
"T",
">",
"node",
"=",
"_root",
";",
"for",
"(",
"byte",
"[",
"]",
"part",
":",
"parts",
")",
"... | Store the given value at the specified path. | [
"Store",
"the",
"given",
"value",
"at",
"the",
"specified",
"path",
"."
] | a958e0b61b50e590731b3be1dca8df8e21ebd43c | https://github.com/drewnoakes/metadata-extractor/blob/a958e0b61b50e590731b3be1dca8df8e21ebd43c/Source/com/drew/lang/ByteTrie.java#L74-L93 |
22,645 | drewnoakes/metadata-extractor | Samples/com/drew/metadata/SampleUsage.java | SampleUsage.print | private static void print(Metadata metadata, String method)
{
System.out.println();
System.out.println("-------------------------------------------------");
System.out.print(' ');
System.out.print(method);
System.out.println("-------------------------------------------------"... | java | private static void print(Metadata metadata, String method)
{
System.out.println();
System.out.println("-------------------------------------------------");
System.out.print(' ');
System.out.print(method);
System.out.println("-------------------------------------------------"... | [
"private",
"static",
"void",
"print",
"(",
"Metadata",
"metadata",
",",
"String",
"method",
")",
"{",
"System",
".",
"out",
".",
"println",
"(",
")",
";",
"System",
".",
"out",
".",
"println",
"(",
"\"-------------------------------------------------\"",
")",
... | Write all extracted values to stdout. | [
"Write",
"all",
"extracted",
"values",
"to",
"stdout",
"."
] | a958e0b61b50e590731b3be1dca8df8e21ebd43c | https://github.com/drewnoakes/metadata-extractor/blob/a958e0b61b50e590731b3be1dca8df8e21ebd43c/Samples/com/drew/metadata/SampleUsage.java#L111-L139 |
22,646 | drewnoakes/metadata-extractor | Source/com/drew/metadata/Directory.java | Directory.containsTag | @java.lang.SuppressWarnings({ "UnnecessaryBoxing" })
public boolean containsTag(int tagType)
{
return _tagMap.containsKey(Integer.valueOf(tagType));
} | java | @java.lang.SuppressWarnings({ "UnnecessaryBoxing" })
public boolean containsTag(int tagType)
{
return _tagMap.containsKey(Integer.valueOf(tagType));
} | [
"@",
"java",
".",
"lang",
".",
"SuppressWarnings",
"(",
"{",
"\"UnnecessaryBoxing\"",
"}",
")",
"public",
"boolean",
"containsTag",
"(",
"int",
"tagType",
")",
"{",
"return",
"_tagMap",
".",
"containsKey",
"(",
"Integer",
".",
"valueOf",
"(",
"tagType",
")",... | Indicates whether the specified tag type has been set.
@param tagType the tag type to check for
@return true if a value exists for the specified tag type, false if not | [
"Indicates",
"whether",
"the",
"specified",
"tag",
"type",
"has",
"been",
"set",
"."
] | a958e0b61b50e590731b3be1dca8df8e21ebd43c | https://github.com/drewnoakes/metadata-extractor/blob/a958e0b61b50e590731b3be1dca8df8e21ebd43c/Source/com/drew/metadata/Directory.java#L107-L111 |
22,647 | drewnoakes/metadata-extractor | Source/com/drew/imaging/riff/RiffReader.java | RiffReader.processRiff | public void processRiff(@NotNull final SequentialReader reader,
@NotNull final RiffHandler handler) throws RiffProcessingException, IOException
{
// RIFF files are always little-endian
reader.setMotorolaByteOrder(false);
// PROCESS FILE HEADER
final Stri... | java | public void processRiff(@NotNull final SequentialReader reader,
@NotNull final RiffHandler handler) throws RiffProcessingException, IOException
{
// RIFF files are always little-endian
reader.setMotorolaByteOrder(false);
// PROCESS FILE HEADER
final Stri... | [
"public",
"void",
"processRiff",
"(",
"@",
"NotNull",
"final",
"SequentialReader",
"reader",
",",
"@",
"NotNull",
"final",
"RiffHandler",
"handler",
")",
"throws",
"RiffProcessingException",
",",
"IOException",
"{",
"// RIFF files are always little-endian",
"reader",
".... | Processes a RIFF data sequence.
@param reader the {@link SequentialReader} from which the data should be read
@param handler the {@link RiffHandler} that will coordinate processing and accept read values
@throws RiffProcessingException if an error occurred during the processing of RIFF data that could not be
ignored o... | [
"Processes",
"a",
"RIFF",
"data",
"sequence",
"."
] | a958e0b61b50e590731b3be1dca8df8e21ebd43c | https://github.com/drewnoakes/metadata-extractor/blob/a958e0b61b50e590731b3be1dca8df8e21ebd43c/Source/com/drew/imaging/riff/RiffReader.java#L51-L76 |
22,648 | drewnoakes/metadata-extractor | Source/com/drew/imaging/jpeg/JpegSegmentData.java | JpegSegmentData.getSegmentTypes | public Iterable<JpegSegmentType> getSegmentTypes()
{
Set<JpegSegmentType> segmentTypes = new HashSet<JpegSegmentType>();
for (Byte segmentTypeByte : _segmentDataMap.keySet())
{
JpegSegmentType segmentType = JpegSegmentType.fromByte(segmentTypeByte);
if (segmentType =... | java | public Iterable<JpegSegmentType> getSegmentTypes()
{
Set<JpegSegmentType> segmentTypes = new HashSet<JpegSegmentType>();
for (Byte segmentTypeByte : _segmentDataMap.keySet())
{
JpegSegmentType segmentType = JpegSegmentType.fromByte(segmentTypeByte);
if (segmentType =... | [
"public",
"Iterable",
"<",
"JpegSegmentType",
">",
"getSegmentTypes",
"(",
")",
"{",
"Set",
"<",
"JpegSegmentType",
">",
"segmentTypes",
"=",
"new",
"HashSet",
"<",
"JpegSegmentType",
">",
"(",
")",
";",
"for",
"(",
"Byte",
"segmentTypeByte",
":",
"_segmentDat... | Gets the set of JPEG segment type identifiers. | [
"Gets",
"the",
"set",
"of",
"JPEG",
"segment",
"type",
"identifiers",
"."
] | a958e0b61b50e590731b3be1dca8df8e21ebd43c | https://github.com/drewnoakes/metadata-extractor/blob/a958e0b61b50e590731b3be1dca8df8e21ebd43c/Source/com/drew/imaging/jpeg/JpegSegmentData.java#L63-L77 |
22,649 | drewnoakes/metadata-extractor | Source/com/drew/imaging/jpeg/JpegSegmentData.java | JpegSegmentData.getSegments | @NotNull
public Iterable<byte[]> getSegments(byte segmentType)
{
final List<byte[]> segmentList = getSegmentList(segmentType);
return segmentList == null ? new ArrayList<byte[]>() : segmentList;
} | java | @NotNull
public Iterable<byte[]> getSegments(byte segmentType)
{
final List<byte[]> segmentList = getSegmentList(segmentType);
return segmentList == null ? new ArrayList<byte[]>() : segmentList;
} | [
"@",
"NotNull",
"public",
"Iterable",
"<",
"byte",
"[",
"]",
">",
"getSegments",
"(",
"byte",
"segmentType",
")",
"{",
"final",
"List",
"<",
"byte",
"[",
"]",
">",
"segmentList",
"=",
"getSegmentList",
"(",
"segmentType",
")",
";",
"return",
"segmentList",... | Returns all instances of a given JPEG segment. If no instances exist, an empty sequence is returned.
@param segmentType a number which identifies the type of JPEG segment being queried
@return zero or more byte arrays, each holding the data of a JPEG segment | [
"Returns",
"all",
"instances",
"of",
"a",
"given",
"JPEG",
"segment",
".",
"If",
"no",
"instances",
"exist",
"an",
"empty",
"sequence",
"is",
"returned",
"."
] | a958e0b61b50e590731b3be1dca8df8e21ebd43c | https://github.com/drewnoakes/metadata-extractor/blob/a958e0b61b50e590731b3be1dca8df8e21ebd43c/Source/com/drew/imaging/jpeg/JpegSegmentData.java#L153-L158 |
22,650 | drewnoakes/metadata-extractor | Source/com/drew/imaging/jpeg/JpegSegmentData.java | JpegSegmentData.getSegmentCount | public int getSegmentCount(byte segmentType)
{
final List<byte[]> segmentList = getSegmentList(segmentType);
return segmentList == null ? 0 : segmentList.size();
} | java | public int getSegmentCount(byte segmentType)
{
final List<byte[]> segmentList = getSegmentList(segmentType);
return segmentList == null ? 0 : segmentList.size();
} | [
"public",
"int",
"getSegmentCount",
"(",
"byte",
"segmentType",
")",
"{",
"final",
"List",
"<",
"byte",
"[",
"]",
">",
"segmentList",
"=",
"getSegmentList",
"(",
"segmentType",
")",
";",
"return",
"segmentList",
"==",
"null",
"?",
"0",
":",
"segmentList",
... | Returns the count of segment data byte arrays stored for a given segment type.
@param segmentType identifies the required segment
@return the segment count (zero if no segments exist). | [
"Returns",
"the",
"count",
"of",
"segment",
"data",
"byte",
"arrays",
"stored",
"for",
"a",
"given",
"segment",
"type",
"."
] | a958e0b61b50e590731b3be1dca8df8e21ebd43c | https://github.com/drewnoakes/metadata-extractor/blob/a958e0b61b50e590731b3be1dca8df8e21ebd43c/Source/com/drew/imaging/jpeg/JpegSegmentData.java#L196-L200 |
22,651 | drewnoakes/metadata-extractor | Source/com/drew/metadata/exif/ExifTiffHandler.java | ExifTiffHandler.getReaderString | @NotNull
private static String getReaderString(final @NotNull RandomAccessReader reader, final int makernoteOffset, final int bytesRequested) throws IOException
{
try {
return reader.getString(makernoteOffset, bytesRequested, Charsets.UTF_8);
} catch(BufferBoundsException e) {
... | java | @NotNull
private static String getReaderString(final @NotNull RandomAccessReader reader, final int makernoteOffset, final int bytesRequested) throws IOException
{
try {
return reader.getString(makernoteOffset, bytesRequested, Charsets.UTF_8);
} catch(BufferBoundsException e) {
... | [
"@",
"NotNull",
"private",
"static",
"String",
"getReaderString",
"(",
"final",
"@",
"NotNull",
"RandomAccessReader",
"reader",
",",
"final",
"int",
"makernoteOffset",
",",
"final",
"int",
"bytesRequested",
")",
"throws",
"IOException",
"{",
"try",
"{",
"return",
... | Read a given number of bytes from the stream
This method is employed to "suppress" attempts to read beyond end of the
file as may happen at the beginning of processMakernote when we read
increasingly longer camera makes.
Instead of failing altogether in this context we return an empty string
which will fail all sensi... | [
"Read",
"a",
"given",
"number",
"of",
"bytes",
"from",
"the",
"stream"
] | a958e0b61b50e590731b3be1dca8df8e21ebd43c | https://github.com/drewnoakes/metadata-extractor/blob/a958e0b61b50e590731b3be1dca8df8e21ebd43c/Source/com/drew/metadata/exif/ExifTiffHandler.java#L379-L387 |
22,652 | drewnoakes/metadata-extractor | Source/com/drew/metadata/iptc/Iso2022Converter.java | Iso2022Converter.convertISO2022CharsetToJavaCharset | @Nullable
public static String convertISO2022CharsetToJavaCharset(@NotNull final byte[] bytes)
{
if (bytes.length > 2 && bytes[0] == ESC && bytes[1] == PERCENT_SIGN && bytes[2] == LATIN_CAPITAL_G)
return UTF_8;
if (bytes.length > 3 && bytes[0] == ESC && (bytes[3] & 0xFF | ((bytes[2]... | java | @Nullable
public static String convertISO2022CharsetToJavaCharset(@NotNull final byte[] bytes)
{
if (bytes.length > 2 && bytes[0] == ESC && bytes[1] == PERCENT_SIGN && bytes[2] == LATIN_CAPITAL_G)
return UTF_8;
if (bytes.length > 3 && bytes[0] == ESC && (bytes[3] & 0xFF | ((bytes[2]... | [
"@",
"Nullable",
"public",
"static",
"String",
"convertISO2022CharsetToJavaCharset",
"(",
"@",
"NotNull",
"final",
"byte",
"[",
"]",
"bytes",
")",
"{",
"if",
"(",
"bytes",
".",
"length",
">",
"2",
"&&",
"bytes",
"[",
"0",
"]",
"==",
"ESC",
"&&",
"bytes",... | Converts the given ISO2022 char set to a Java charset name.
@param bytes string data encoded using ISO2022
@return the Java charset name as a string, or <code>null</code> if the conversion was not possible | [
"Converts",
"the",
"given",
"ISO2022",
"char",
"set",
"to",
"a",
"Java",
"charset",
"name",
"."
] | a958e0b61b50e590731b3be1dca8df8e21ebd43c | https://github.com/drewnoakes/metadata-extractor/blob/a958e0b61b50e590731b3be1dca8df8e21ebd43c/Source/com/drew/metadata/iptc/Iso2022Converter.java#L48-L58 |
22,653 | drewnoakes/metadata-extractor | Source/com/drew/metadata/eps/EpsReader.java | EpsReader.extract | public void extract(@NotNull final InputStream inputStream, @NotNull final Metadata metadata) throws IOException
{
RandomAccessStreamReader reader = new RandomAccessStreamReader(inputStream);
EpsDirectory directory = new EpsDirectory();
metadata.addDirectory(directory);
/*
... | java | public void extract(@NotNull final InputStream inputStream, @NotNull final Metadata metadata) throws IOException
{
RandomAccessStreamReader reader = new RandomAccessStreamReader(inputStream);
EpsDirectory directory = new EpsDirectory();
metadata.addDirectory(directory);
/*
... | [
"public",
"void",
"extract",
"(",
"@",
"NotNull",
"final",
"InputStream",
"inputStream",
",",
"@",
"NotNull",
"final",
"Metadata",
"metadata",
")",
"throws",
"IOException",
"{",
"RandomAccessStreamReader",
"reader",
"=",
"new",
"RandomAccessStreamReader",
"(",
"inpu... | Filter method that determines if file will contain an EPS Header. If it does, it will read the necessary
data and then set the position to the beginning of the PostScript data. If it does not, the position will not
be changed. After both scenarios, the main extract method is called.
@param inputStream InputStream c... | [
"Filter",
"method",
"that",
"determines",
"if",
"file",
"will",
"contain",
"an",
"EPS",
"Header",
".",
"If",
"it",
"does",
"it",
"will",
"read",
"the",
"necessary",
"data",
"and",
"then",
"set",
"the",
"position",
"to",
"the",
"beginning",
"of",
"the",
"... | a958e0b61b50e590731b3be1dca8df8e21ebd43c | https://github.com/drewnoakes/metadata-extractor/blob/a958e0b61b50e590731b3be1dca8df8e21ebd43c/Source/com/drew/metadata/eps/EpsReader.java#L54-L103 |
22,654 | drewnoakes/metadata-extractor | Source/com/drew/metadata/eps/EpsReader.java | EpsReader.addToDirectory | private void addToDirectory(@NotNull final EpsDirectory directory, String name, String value) throws IOException
{
Integer tag = EpsDirectory._tagIntegerMap.get(name);
if (tag == null)
return;
switch (tag) {
case EpsDirectory.TAG_IMAGE_DATA:
extractI... | java | private void addToDirectory(@NotNull final EpsDirectory directory, String name, String value) throws IOException
{
Integer tag = EpsDirectory._tagIntegerMap.get(name);
if (tag == null)
return;
switch (tag) {
case EpsDirectory.TAG_IMAGE_DATA:
extractI... | [
"private",
"void",
"addToDirectory",
"(",
"@",
"NotNull",
"final",
"EpsDirectory",
"directory",
",",
"String",
"name",
",",
"String",
"value",
")",
"throws",
"IOException",
"{",
"Integer",
"tag",
"=",
"EpsDirectory",
".",
"_tagIntegerMap",
".",
"get",
"(",
"na... | Default case that adds comment with keyword to directory
@param directory EpsDirectory to add extracted data to
@param name String that holds name of current comment
@param value String that holds value of current comment | [
"Default",
"case",
"that",
"adds",
"comment",
"with",
"keyword",
"to",
"directory"
] | a958e0b61b50e590731b3be1dca8df8e21ebd43c | https://github.com/drewnoakes/metadata-extractor/blob/a958e0b61b50e590731b3be1dca8df8e21ebd43c/Source/com/drew/metadata/eps/EpsReader.java#L165-L190 |
22,655 | drewnoakes/metadata-extractor | Source/com/drew/metadata/eps/EpsReader.java | EpsReader.tryHexToInt | private static int tryHexToInt(byte b)
{
if (b >= '0' && b <= '9')
return b - '0';
if (b >= 'A' && b <= 'F')
return b - 'A' + 10;
if (b >= 'a' && b <= 'f')
return b - 'a' + 10;
return -1;
} | java | private static int tryHexToInt(byte b)
{
if (b >= '0' && b <= '9')
return b - '0';
if (b >= 'A' && b <= 'F')
return b - 'A' + 10;
if (b >= 'a' && b <= 'f')
return b - 'a' + 10;
return -1;
} | [
"private",
"static",
"int",
"tryHexToInt",
"(",
"byte",
"b",
")",
"{",
"if",
"(",
"b",
">=",
"'",
"'",
"&&",
"b",
"<=",
"'",
"'",
")",
"return",
"b",
"-",
"'",
"'",
";",
"if",
"(",
"b",
">=",
"'",
"'",
"&&",
"b",
"<=",
"'",
"'",
")",
"ret... | Treats a byte as an ASCII character, and returns it's numerical value in hexadecimal.
If conversion is not possible, returns -1. | [
"Treats",
"a",
"byte",
"as",
"an",
"ASCII",
"character",
"and",
"returns",
"it",
"s",
"numerical",
"value",
"in",
"hexadecimal",
".",
"If",
"conversion",
"is",
"not",
"possible",
"returns",
"-",
"1",
"."
] | a958e0b61b50e590731b3be1dca8df8e21ebd43c | https://github.com/drewnoakes/metadata-extractor/blob/a958e0b61b50e590731b3be1dca8df8e21ebd43c/Source/com/drew/metadata/eps/EpsReader.java#L385-L394 |
22,656 | drewnoakes/metadata-extractor | Source/com/drew/metadata/exif/GpsDirectory.java | GpsDirectory.getGeoLocation | @Nullable
public GeoLocation getGeoLocation()
{
Rational[] latitudes = getRationalArray(TAG_LATITUDE);
Rational[] longitudes = getRationalArray(TAG_LONGITUDE);
String latitudeRef = getString(TAG_LATITUDE_REF);
String longitudeRef = getString(TAG_LONGITUDE_REF);
// Make s... | java | @Nullable
public GeoLocation getGeoLocation()
{
Rational[] latitudes = getRationalArray(TAG_LATITUDE);
Rational[] longitudes = getRationalArray(TAG_LONGITUDE);
String latitudeRef = getString(TAG_LATITUDE_REF);
String longitudeRef = getString(TAG_LONGITUDE_REF);
// Make s... | [
"@",
"Nullable",
"public",
"GeoLocation",
"getGeoLocation",
"(",
")",
"{",
"Rational",
"[",
"]",
"latitudes",
"=",
"getRationalArray",
"(",
"TAG_LATITUDE",
")",
";",
"Rational",
"[",
"]",
"longitudes",
"=",
"getRationalArray",
"(",
"TAG_LONGITUDE",
")",
";",
"... | Parses various tags in an attempt to obtain a single object representing the latitude and longitude
at which this image was captured.
@return The geographical location of this image, if possible, otherwise null | [
"Parses",
"various",
"tags",
"in",
"an",
"attempt",
"to",
"obtain",
"a",
"single",
"object",
"representing",
"the",
"latitude",
"and",
"longitude",
"at",
"which",
"this",
"image",
"was",
"captured",
"."
] | a958e0b61b50e590731b3be1dca8df8e21ebd43c | https://github.com/drewnoakes/metadata-extractor/blob/a958e0b61b50e590731b3be1dca8df8e21ebd43c/Source/com/drew/metadata/exif/GpsDirectory.java#L174-L198 |
22,657 | drewnoakes/metadata-extractor | Source/com/drew/metadata/exif/GpsDirectory.java | GpsDirectory.getGpsDate | @Nullable
public Date getGpsDate()
{
String date = getString(TAG_DATE_STAMP);
Rational[] timeComponents = getRationalArray(TAG_TIME_STAMP);
// Make sure we have the required values
if (date == null)
return null;
if (timeComponents == null || timeComponents.le... | java | @Nullable
public Date getGpsDate()
{
String date = getString(TAG_DATE_STAMP);
Rational[] timeComponents = getRationalArray(TAG_TIME_STAMP);
// Make sure we have the required values
if (date == null)
return null;
if (timeComponents == null || timeComponents.le... | [
"@",
"Nullable",
"public",
"Date",
"getGpsDate",
"(",
")",
"{",
"String",
"date",
"=",
"getString",
"(",
"TAG_DATE_STAMP",
")",
";",
"Rational",
"[",
"]",
"timeComponents",
"=",
"getRationalArray",
"(",
"TAG_TIME_STAMP",
")",
";",
"// Make sure we have the require... | Parses the date stamp tag and the time stamp tag to obtain a single Date object representing the
date and time when this image was captured.
@return A Date object representing when this image was captured, if possible, otherwise null | [
"Parses",
"the",
"date",
"stamp",
"tag",
"and",
"the",
"time",
"stamp",
"tag",
"to",
"obtain",
"a",
"single",
"Date",
"object",
"representing",
"the",
"date",
"and",
"time",
"when",
"this",
"image",
"was",
"captured",
"."
] | a958e0b61b50e590731b3be1dca8df8e21ebd43c | https://github.com/drewnoakes/metadata-extractor/blob/a958e0b61b50e590731b3be1dca8df8e21ebd43c/Source/com/drew/metadata/exif/GpsDirectory.java#L206-L226 |
22,658 | drewnoakes/metadata-extractor | Source/com/drew/lang/RandomAccessReader.java | RandomAccessReader.getBit | public boolean getBit(int index) throws IOException
{
int byteIndex = index / 8;
int bitIndex = index % 8;
validateIndex(byteIndex, 1);
byte b = getByte(byteIndex);
return ((b >> bitIndex) & 1) == 1;
} | java | public boolean getBit(int index) throws IOException
{
int byteIndex = index / 8;
int bitIndex = index % 8;
validateIndex(byteIndex, 1);
byte b = getByte(byteIndex);
return ((b >> bitIndex) & 1) == 1;
} | [
"public",
"boolean",
"getBit",
"(",
"int",
"index",
")",
"throws",
"IOException",
"{",
"int",
"byteIndex",
"=",
"index",
"/",
"8",
";",
"int",
"bitIndex",
"=",
"index",
"%",
"8",
";",
"validateIndex",
"(",
"byteIndex",
",",
"1",
")",
";",
"byte",
"b",
... | Gets whether a bit at a specific index is set or not.
@param index the number of bits at which to test
@return true if the bit is set, otherwise false
@throws IOException the buffer does not contain enough bytes to service the request, or index is negative | [
"Gets",
"whether",
"a",
"bit",
"at",
"a",
"specific",
"index",
"is",
"set",
"or",
"not",
"."
] | a958e0b61b50e590731b3be1dca8df8e21ebd43c | https://github.com/drewnoakes/metadata-extractor/blob/a958e0b61b50e590731b3be1dca8df8e21ebd43c/Source/com/drew/lang/RandomAccessReader.java#L140-L149 |
22,659 | drewnoakes/metadata-extractor | Source/com/drew/lang/RandomAccessReader.java | RandomAccessReader.getUInt16 | public int getUInt16(int index) throws IOException
{
validateIndex(index, 2);
if (_isMotorolaByteOrder) {
// Motorola - MSB first
return (getByte(index ) << 8 & 0xFF00) |
(getByte(index + 1) & 0xFF);
} else {
// Intel ordering -... | java | public int getUInt16(int index) throws IOException
{
validateIndex(index, 2);
if (_isMotorolaByteOrder) {
// Motorola - MSB first
return (getByte(index ) << 8 & 0xFF00) |
(getByte(index + 1) & 0xFF);
} else {
// Intel ordering -... | [
"public",
"int",
"getUInt16",
"(",
"int",
"index",
")",
"throws",
"IOException",
"{",
"validateIndex",
"(",
"index",
",",
"2",
")",
";",
"if",
"(",
"_isMotorolaByteOrder",
")",
"{",
"// Motorola - MSB first",
"return",
"(",
"getByte",
"(",
"index",
")",
"<<"... | Returns an unsigned 16-bit int calculated from two bytes of data at the specified index.
@param index position within the data buffer to read first byte
@return the 16 bit int value, between 0x0000 and 0xFFFF
@throws IOException the buffer does not contain enough bytes to service the request, or index is negative | [
"Returns",
"an",
"unsigned",
"16",
"-",
"bit",
"int",
"calculated",
"from",
"two",
"bytes",
"of",
"data",
"at",
"the",
"specified",
"index",
"."
] | a958e0b61b50e590731b3be1dca8df8e21ebd43c | https://github.com/drewnoakes/metadata-extractor/blob/a958e0b61b50e590731b3be1dca8df8e21ebd43c/Source/com/drew/lang/RandomAccessReader.java#L186-L199 |
22,660 | drewnoakes/metadata-extractor | Source/com/drew/lang/RandomAccessReader.java | RandomAccessReader.getInt24 | public int getInt24(int index) throws IOException
{
validateIndex(index, 3);
if (_isMotorolaByteOrder) {
// Motorola - MSB first (big endian)
return (((int)getByte(index )) << 16 & 0xFF0000) |
(((int)getByte(index + 1)) << 8 & 0xFF00) |
... | java | public int getInt24(int index) throws IOException
{
validateIndex(index, 3);
if (_isMotorolaByteOrder) {
// Motorola - MSB first (big endian)
return (((int)getByte(index )) << 16 & 0xFF0000) |
(((int)getByte(index + 1)) << 8 & 0xFF00) |
... | [
"public",
"int",
"getInt24",
"(",
"int",
"index",
")",
"throws",
"IOException",
"{",
"validateIndex",
"(",
"index",
",",
"3",
")",
";",
"if",
"(",
"_isMotorolaByteOrder",
")",
"{",
"// Motorola - MSB first (big endian)",
"return",
"(",
"(",
"(",
"int",
")",
... | Get a 24-bit unsigned integer from the buffer, returning it as an int.
@param index position within the data buffer to read first byte
@return the unsigned 24-bit int value as a long, between 0x00000000 and 0x00FFFFFF
@throws IOException the buffer does not contain enough bytes to service the request, or index is nega... | [
"Get",
"a",
"24",
"-",
"bit",
"unsigned",
"integer",
"from",
"the",
"buffer",
"returning",
"it",
"as",
"an",
"int",
"."
] | a958e0b61b50e590731b3be1dca8df8e21ebd43c | https://github.com/drewnoakes/metadata-extractor/blob/a958e0b61b50e590731b3be1dca8df8e21ebd43c/Source/com/drew/lang/RandomAccessReader.java#L230-L245 |
22,661 | drewnoakes/metadata-extractor | Source/com/drew/lang/RandomAccessReader.java | RandomAccessReader.getInt32 | public int getInt32(int index) throws IOException
{
validateIndex(index, 4);
if (_isMotorolaByteOrder) {
// Motorola - MSB first (big endian)
return (getByte(index ) << 24 & 0xFF000000) |
(getByte(index + 1) << 16 & 0xFF0000) |
(getBy... | java | public int getInt32(int index) throws IOException
{
validateIndex(index, 4);
if (_isMotorolaByteOrder) {
// Motorola - MSB first (big endian)
return (getByte(index ) << 24 & 0xFF000000) |
(getByte(index + 1) << 16 & 0xFF0000) |
(getBy... | [
"public",
"int",
"getInt32",
"(",
"int",
"index",
")",
"throws",
"IOException",
"{",
"validateIndex",
"(",
"index",
",",
"4",
")",
";",
"if",
"(",
"_isMotorolaByteOrder",
")",
"{",
"// Motorola - MSB first (big endian)",
"return",
"(",
"getByte",
"(",
"index",
... | Returns a signed 32-bit integer from four bytes of data at the specified index the buffer.
@param index position within the data buffer to read first byte
@return the signed 32 bit int value, between 0x00000000 and 0xFFFFFFFF
@throws IOException the buffer does not contain enough bytes to service the request, or index... | [
"Returns",
"a",
"signed",
"32",
"-",
"bit",
"integer",
"from",
"four",
"bytes",
"of",
"data",
"at",
"the",
"specified",
"index",
"the",
"buffer",
"."
] | a958e0b61b50e590731b3be1dca8df8e21ebd43c | https://github.com/drewnoakes/metadata-extractor/blob/a958e0b61b50e590731b3be1dca8df8e21ebd43c/Source/com/drew/lang/RandomAccessReader.java#L280-L297 |
22,662 | drewnoakes/metadata-extractor | Source/com/drew/metadata/TagDescriptor.java | TagDescriptor.getEncodedTextDescription | @Nullable
protected String getEncodedTextDescription(int tagType)
{
byte[] commentBytes = _directory.getByteArray(tagType);
if (commentBytes == null)
return null;
if (commentBytes.length == 0)
return "";
final Map<String, String> encodingMap = new HashMap... | java | @Nullable
protected String getEncodedTextDescription(int tagType)
{
byte[] commentBytes = _directory.getByteArray(tagType);
if (commentBytes == null)
return null;
if (commentBytes.length == 0)
return "";
final Map<String, String> encodingMap = new HashMap... | [
"@",
"Nullable",
"protected",
"String",
"getEncodedTextDescription",
"(",
"int",
"tagType",
")",
"{",
"byte",
"[",
"]",
"commentBytes",
"=",
"_directory",
".",
"getByteArray",
"(",
"tagType",
")",
";",
"if",
"(",
"commentBytes",
"==",
"null",
")",
"return",
... | EXIF UserComment, GPSProcessingMethod and GPSAreaInformation | [
"EXIF",
"UserComment",
"GPSProcessingMethod",
"and",
"GPSAreaInformation"
] | a958e0b61b50e590731b3be1dca8df8e21ebd43c | https://github.com/drewnoakes/metadata-extractor/blob/a958e0b61b50e590731b3be1dca8df8e21ebd43c/Source/com/drew/metadata/TagDescriptor.java#L467-L505 |
22,663 | drewnoakes/metadata-extractor | Source/com/drew/lang/SequentialReader.java | SequentialReader.getInt32 | public int getInt32() throws IOException
{
if (_isMotorolaByteOrder) {
// Motorola - MSB first (big endian)
return (getByte() << 24 & 0xFF000000) |
(getByte() << 16 & 0xFF0000) |
(getByte() << 8 & 0xFF00) |
(getByte() & ... | java | public int getInt32() throws IOException
{
if (_isMotorolaByteOrder) {
// Motorola - MSB first (big endian)
return (getByte() << 24 & 0xFF000000) |
(getByte() << 16 & 0xFF0000) |
(getByte() << 8 & 0xFF00) |
(getByte() & ... | [
"public",
"int",
"getInt32",
"(",
")",
"throws",
"IOException",
"{",
"if",
"(",
"_isMotorolaByteOrder",
")",
"{",
"// Motorola - MSB first (big endian)",
"return",
"(",
"getByte",
"(",
")",
"<<",
"24",
"&",
"0xFF000000",
")",
"|",
"(",
"getByte",
"(",
")",
"... | Returns a signed 32-bit integer from four bytes of data.
@return the signed 32 bit int value, between 0x00000000 and 0xFFFFFFFF
@throws IOException the buffer does not contain enough bytes to service the request | [
"Returns",
"a",
"signed",
"32",
"-",
"bit",
"integer",
"from",
"four",
"bytes",
"of",
"data",
"."
] | a958e0b61b50e590731b3be1dca8df8e21ebd43c | https://github.com/drewnoakes/metadata-extractor/blob/a958e0b61b50e590731b3be1dca8df8e21ebd43c/Source/com/drew/lang/SequentialReader.java#L217-L232 |
22,664 | Ashok-Varma/BottomNavigation | bottom-navigation-bar/src/main/java/com/ashokvarma/bottomnavigation/ShapeBadgeItem.java | ShapeBadgeItem.draw | void draw(Canvas canvas) {
mCanvasRect.set(0.0f, 0.0f, canvas.getWidth(), canvas.getHeight());
switch (mShape) {
case SHAPE_RECTANGLE:
canvas.drawRect(mCanvasRect, mCanvasPaint);
break;
case SHAPE_OVAL:
canvas.drawOval(mCanvasRect, ... | java | void draw(Canvas canvas) {
mCanvasRect.set(0.0f, 0.0f, canvas.getWidth(), canvas.getHeight());
switch (mShape) {
case SHAPE_RECTANGLE:
canvas.drawRect(mCanvasRect, mCanvasPaint);
break;
case SHAPE_OVAL:
canvas.drawOval(mCanvasRect, ... | [
"void",
"draw",
"(",
"Canvas",
"canvas",
")",
"{",
"mCanvasRect",
".",
"set",
"(",
"0.0f",
",",
"0.0f",
",",
"canvas",
".",
"getWidth",
"(",
")",
",",
"canvas",
".",
"getHeight",
"(",
")",
")",
";",
"switch",
"(",
"mShape",
")",
"{",
"case",
"SHAPE... | draw's specified shape
@param canvas on which shape has to be drawn | [
"draw",
"s",
"specified",
"shape"
] | a5c486a6dfa1ebe7049e2e025e0d967111ecfd0b | https://github.com/Ashok-Varma/BottomNavigation/blob/a5c486a6dfa1ebe7049e2e025e0d967111ecfd0b/bottom-navigation-bar/src/main/java/com/ashokvarma/bottomnavigation/ShapeBadgeItem.java#L174-L193 |
22,665 | Ashok-Varma/BottomNavigation | bottom-navigation-bar/src/main/java/com/ashokvarma/bottomnavigation/ShapeBadgeItem.java | ShapeBadgeItem.refreshMargin | private void refreshMargin() {
if (isWeakReferenceValid()) {
ViewGroup.MarginLayoutParams layoutParams = (ViewGroup.MarginLayoutParams) getTextView().get().getLayoutParams();
layoutParams.bottomMargin = mEdgeMarginInPx;
layoutParams.topMargin = mEdgeMarginInPx;
la... | java | private void refreshMargin() {
if (isWeakReferenceValid()) {
ViewGroup.MarginLayoutParams layoutParams = (ViewGroup.MarginLayoutParams) getTextView().get().getLayoutParams();
layoutParams.bottomMargin = mEdgeMarginInPx;
layoutParams.topMargin = mEdgeMarginInPx;
la... | [
"private",
"void",
"refreshMargin",
"(",
")",
"{",
"if",
"(",
"isWeakReferenceValid",
"(",
")",
")",
"{",
"ViewGroup",
".",
"MarginLayoutParams",
"layoutParams",
"=",
"(",
"ViewGroup",
".",
"MarginLayoutParams",
")",
"getTextView",
"(",
")",
".",
"get",
"(",
... | refresh's margin if set | [
"refresh",
"s",
"margin",
"if",
"set"
] | a5c486a6dfa1ebe7049e2e025e0d967111ecfd0b | https://github.com/Ashok-Varma/BottomNavigation/blob/a5c486a6dfa1ebe7049e2e025e0d967111ecfd0b/bottom-navigation-bar/src/main/java/com/ashokvarma/bottomnavigation/ShapeBadgeItem.java#L268-L277 |
22,666 | Ashok-Varma/BottomNavigation | bottom-navigation-bar/src/main/java/com/ashokvarma/bottomnavigation/TextBadgeItem.java | TextBadgeItem.refreshDrawable | private void refreshDrawable() {
if (isWeakReferenceValid()) {
TextView textView = getTextView().get();
textView.setBackgroundDrawable(getBadgeDrawable(textView.getContext()));
}
} | java | private void refreshDrawable() {
if (isWeakReferenceValid()) {
TextView textView = getTextView().get();
textView.setBackgroundDrawable(getBadgeDrawable(textView.getContext()));
}
} | [
"private",
"void",
"refreshDrawable",
"(",
")",
"{",
"if",
"(",
"isWeakReferenceValid",
"(",
")",
")",
"{",
"TextView",
"textView",
"=",
"getTextView",
"(",
")",
".",
"get",
"(",
")",
";",
"textView",
".",
"setBackgroundDrawable",
"(",
"getBadgeDrawable",
"(... | refresh's background drawable | [
"refresh",
"s",
"background",
"drawable"
] | a5c486a6dfa1ebe7049e2e025e0d967111ecfd0b | https://github.com/Ashok-Varma/BottomNavigation/blob/a5c486a6dfa1ebe7049e2e025e0d967111ecfd0b/bottom-navigation-bar/src/main/java/com/ashokvarma/bottomnavigation/TextBadgeItem.java#L275-L280 |
22,667 | Ashok-Varma/BottomNavigation | bottom-navigation-bar/src/main/java/com/ashokvarma/bottomnavigation/TextBadgeItem.java | TextBadgeItem.setTextColor | private void setTextColor() {
if (isWeakReferenceValid()) {
TextView textView = getTextView().get();
textView.setTextColor(getTextColor(textView.getContext()));
}
} | java | private void setTextColor() {
if (isWeakReferenceValid()) {
TextView textView = getTextView().get();
textView.setTextColor(getTextColor(textView.getContext()));
}
} | [
"private",
"void",
"setTextColor",
"(",
")",
"{",
"if",
"(",
"isWeakReferenceValid",
"(",
")",
")",
"{",
"TextView",
"textView",
"=",
"getTextView",
"(",
")",
".",
"get",
"(",
")",
";",
"textView",
".",
"setTextColor",
"(",
"getTextColor",
"(",
"textView",... | set's new text color | [
"set",
"s",
"new",
"text",
"color"
] | a5c486a6dfa1ebe7049e2e025e0d967111ecfd0b | https://github.com/Ashok-Varma/BottomNavigation/blob/a5c486a6dfa1ebe7049e2e025e0d967111ecfd0b/bottom-navigation-bar/src/main/java/com/ashokvarma/bottomnavigation/TextBadgeItem.java#L285-L290 |
22,668 | Ashok-Varma/BottomNavigation | bottom-navigation-bar/src/main/java/com/ashokvarma/bottomnavigation/BadgeItem.java | BadgeItem.bindToBottomTab | void bindToBottomTab(BottomNavigationTab bottomNavigationTab) {
// set initial bindings
bottomNavigationTab.badgeView.clearPrevious();
if (bottomNavigationTab.badgeItem != null) {
// removing old reference
bottomNavigationTab.badgeItem.setTextView(null);
}
... | java | void bindToBottomTab(BottomNavigationTab bottomNavigationTab) {
// set initial bindings
bottomNavigationTab.badgeView.clearPrevious();
if (bottomNavigationTab.badgeItem != null) {
// removing old reference
bottomNavigationTab.badgeItem.setTextView(null);
}
... | [
"void",
"bindToBottomTab",
"(",
"BottomNavigationTab",
"bottomNavigationTab",
")",
"{",
"// set initial bindings",
"bottomNavigationTab",
".",
"badgeView",
".",
"clearPrevious",
"(",
")",
";",
"if",
"(",
"bottomNavigationTab",
".",
"badgeItem",
"!=",
"null",
")",
"{",... | binds all badgeItem, BottomNavigationTab and BadgeTextView
@param bottomNavigationTab to which badgeItem needs to be attached | [
"binds",
"all",
"badgeItem",
"BottomNavigationTab",
"and",
"BadgeTextView"
] | a5c486a6dfa1ebe7049e2e025e0d967111ecfd0b | https://github.com/Ashok-Varma/BottomNavigation/blob/a5c486a6dfa1ebe7049e2e025e0d967111ecfd0b/bottom-navigation-bar/src/main/java/com/ashokvarma/bottomnavigation/BadgeItem.java#L91-L118 |
22,669 | Ashok-Varma/BottomNavigation | bottom-navigation-bar/src/main/java/com/ashokvarma/bottomnavigation/utils/Utils.java | Utils.fetchContextColor | public static int fetchContextColor(Context context, int androidAttribute) {
TypedValue typedValue = new TypedValue();
TypedArray a = context.obtainStyledAttributes(typedValue.data, new int[]{androidAttribute});
int color = a.getColor(0, 0);
a.recycle();
return color;
} | java | public static int fetchContextColor(Context context, int androidAttribute) {
TypedValue typedValue = new TypedValue();
TypedArray a = context.obtainStyledAttributes(typedValue.data, new int[]{androidAttribute});
int color = a.getColor(0, 0);
a.recycle();
return color;
} | [
"public",
"static",
"int",
"fetchContextColor",
"(",
"Context",
"context",
",",
"int",
"androidAttribute",
")",
"{",
"TypedValue",
"typedValue",
"=",
"new",
"TypedValue",
"(",
")",
";",
"TypedArray",
"a",
"=",
"context",
".",
"obtainStyledAttributes",
"(",
"type... | This method can be extended to get all android attributes color, string, dimension ...etc
@param context used to fetch android attribute
@param androidAttribute attribute codes like R.attr.colorAccent
@return in this case color of android attribute | [
"This",
"method",
"can",
"be",
"extended",
"to",
"get",
"all",
"android",
"attributes",
"color",
"string",
"dimension",
"...",
"etc"
] | a5c486a6dfa1ebe7049e2e025e0d967111ecfd0b | https://github.com/Ashok-Varma/BottomNavigation/blob/a5c486a6dfa1ebe7049e2e025e0d967111ecfd0b/bottom-navigation-bar/src/main/java/com/ashokvarma/bottomnavigation/utils/Utils.java#L42-L51 |
22,670 | Ashok-Varma/BottomNavigation | bottom-navigation-bar/src/main/java/com/ashokvarma/bottomnavigation/BottomNavigationBar.java | BottomNavigationBar.parseAttrs | private void parseAttrs(Context context, AttributeSet attrs) {
if (attrs != null) {
TypedArray typedArray = context.getTheme().obtainStyledAttributes(attrs, R.styleable.BottomNavigationBar, 0, 0);
mActiveColor = typedArray.getColor(R.styleable.BottomNavigationBar_bnbActiveColor, Utils.f... | java | private void parseAttrs(Context context, AttributeSet attrs) {
if (attrs != null) {
TypedArray typedArray = context.getTheme().obtainStyledAttributes(attrs, R.styleable.BottomNavigationBar, 0, 0);
mActiveColor = typedArray.getColor(R.styleable.BottomNavigationBar_bnbActiveColor, Utils.f... | [
"private",
"void",
"parseAttrs",
"(",
"Context",
"context",
",",
"AttributeSet",
"attrs",
")",
"{",
"if",
"(",
"attrs",
"!=",
"null",
")",
"{",
"TypedArray",
"typedArray",
"=",
"context",
".",
"getTheme",
"(",
")",
".",
"obtainStyledAttributes",
"(",
"attrs"... | This method initiates the bottomNavigationBar properties,
Tries to get them form XML if not preset sets them to their default values.
@param context context of the bottomNavigationBar
@param attrs attributes mentioned in the layout XML by user | [
"This",
"method",
"initiates",
"the",
"bottomNavigationBar",
"properties",
"Tries",
"to",
"get",
"them",
"form",
"XML",
"if",
"not",
"preset",
"sets",
"them",
"to",
"their",
"default",
"values",
"."
] | a5c486a6dfa1ebe7049e2e025e0d967111ecfd0b | https://github.com/Ashok-Varma/BottomNavigation/blob/a5c486a6dfa1ebe7049e2e025e0d967111ecfd0b/bottom-navigation-bar/src/main/java/com/ashokvarma/bottomnavigation/BottomNavigationBar.java#L146-L203 |
22,671 | Ashok-Varma/BottomNavigation | bottom-navigation-bar/src/main/java/com/ashokvarma/bottomnavigation/BottomNavigationBar.java | BottomNavigationBar.init | private void init() {
// MarginLayoutParams marginParams = new ViewGroup.MarginLayoutParams(new ViewGroup.LayoutParams(ViewGroup.LayoutParams.MATCH_PARENT, (int) getContext().getResources().getDimension(R.dimen.bottom_navigation_padded_height)));
// marginParams.setMargins(0, (int) getContext().getResour... | java | private void init() {
// MarginLayoutParams marginParams = new ViewGroup.MarginLayoutParams(new ViewGroup.LayoutParams(ViewGroup.LayoutParams.MATCH_PARENT, (int) getContext().getResources().getDimension(R.dimen.bottom_navigation_padded_height)));
// marginParams.setMargins(0, (int) getContext().getResour... | [
"private",
"void",
"init",
"(",
")",
"{",
"// MarginLayoutParams marginParams = new ViewGroup.MarginLayoutParams(new ViewGroup.LayoutParams(ViewGroup.LayoutParams.MATCH_PARENT, (int) getContext().getResources().getDimension(R.dimen.bottom_navigation_padded_height)));",
"// marginParams.s... | This method initiates the bottomNavigationBar and handles layout related values | [
"This",
"method",
"initiates",
"the",
"bottomNavigationBar",
"and",
"handles",
"layout",
"related",
"values"
] | a5c486a6dfa1ebe7049e2e025e0d967111ecfd0b | https://github.com/Ashok-Varma/BottomNavigation/blob/a5c486a6dfa1ebe7049e2e025e0d967111ecfd0b/bottom-navigation-bar/src/main/java/com/ashokvarma/bottomnavigation/BottomNavigationBar.java#L208-L229 |
22,672 | Ashok-Varma/BottomNavigation | bottom-navigation-bar/src/main/java/com/ashokvarma/bottomnavigation/BottomNavigationBar.java | BottomNavigationBar.initialise | public void initialise() {
mSelectedPosition = DEFAULT_SELECTED_POSITION;
mBottomNavigationTabs.clear();
if (!mBottomNavigationItems.isEmpty()) {
mTabContainer.removeAllViews();
if (mMode == MODE_DEFAULT) {
if (mBottomNavigationItems.size() <= MIN_SIZE) {... | java | public void initialise() {
mSelectedPosition = DEFAULT_SELECTED_POSITION;
mBottomNavigationTabs.clear();
if (!mBottomNavigationItems.isEmpty()) {
mTabContainer.removeAllViews();
if (mMode == MODE_DEFAULT) {
if (mBottomNavigationItems.size() <= MIN_SIZE) {... | [
"public",
"void",
"initialise",
"(",
")",
"{",
"mSelectedPosition",
"=",
"DEFAULT_SELECTED_POSITION",
";",
"mBottomNavigationTabs",
".",
"clear",
"(",
")",
";",
"if",
"(",
"!",
"mBottomNavigationItems",
".",
"isEmpty",
"(",
")",
")",
"{",
"mTabContainer",
".",
... | This method should be called at the end of all customisation method.
This method will take all changes in to consideration and redraws tabs. | [
"This",
"method",
"should",
"be",
"called",
"at",
"the",
"end",
"of",
"all",
"customisation",
"method",
".",
"This",
"method",
"will",
"take",
"all",
"changes",
"in",
"to",
"consideration",
"and",
"redraws",
"tabs",
"."
] | a5c486a6dfa1ebe7049e2e025e0d967111ecfd0b | https://github.com/Ashok-Varma/BottomNavigation/blob/a5c486a6dfa1ebe7049e2e025e0d967111ecfd0b/bottom-navigation-bar/src/main/java/com/ashokvarma/bottomnavigation/BottomNavigationBar.java#L360-L417 |
22,673 | Ashok-Varma/BottomNavigation | bottom-navigation-bar/src/main/java/com/ashokvarma/bottomnavigation/BottomNavigationBar.java | BottomNavigationBar.clearAll | public void clearAll() {
mTabContainer.removeAllViews();
mBottomNavigationTabs.clear();
mBottomNavigationItems.clear();
mBackgroundOverlay.setVisibility(View.GONE);
mContainer.setBackgroundColor(Color.TRANSPARENT);
mSelectedPosition = DEFAULT_SELECTED_POSITION;
} | java | public void clearAll() {
mTabContainer.removeAllViews();
mBottomNavigationTabs.clear();
mBottomNavigationItems.clear();
mBackgroundOverlay.setVisibility(View.GONE);
mContainer.setBackgroundColor(Color.TRANSPARENT);
mSelectedPosition = DEFAULT_SELECTED_POSITION;
} | [
"public",
"void",
"clearAll",
"(",
")",
"{",
"mTabContainer",
".",
"removeAllViews",
"(",
")",
";",
"mBottomNavigationTabs",
".",
"clear",
"(",
")",
";",
"mBottomNavigationItems",
".",
"clear",
"(",
")",
";",
"mBackgroundOverlay",
".",
"setVisibility",
"(",
"V... | Clears all stored data and this helps to re-initialise tabs from scratch | [
"Clears",
"all",
"stored",
"data",
"and",
"this",
"helps",
"to",
"re",
"-",
"initialise",
"tabs",
"from",
"scratch"
] | a5c486a6dfa1ebe7049e2e025e0d967111ecfd0b | https://github.com/Ashok-Varma/BottomNavigation/blob/a5c486a6dfa1ebe7049e2e025e0d967111ecfd0b/bottom-navigation-bar/src/main/java/com/ashokvarma/bottomnavigation/BottomNavigationBar.java#L447-L454 |
22,674 | Ashok-Varma/BottomNavigation | bottom-navigation-bar/src/main/java/com/ashokvarma/bottomnavigation/BottomNavigationBar.java | BottomNavigationBar.setUpTab | private void setUpTab(boolean isNoTitleMode, BottomNavigationTab bottomNavigationTab, BottomNavigationItem currentItem, int itemWidth, int itemActiveWidth) {
bottomNavigationTab.setIsNoTitleMode(isNoTitleMode);
bottomNavigationTab.setInactiveWidth(itemWidth);
bottomNavigationTab.setActiveWidth(i... | java | private void setUpTab(boolean isNoTitleMode, BottomNavigationTab bottomNavigationTab, BottomNavigationItem currentItem, int itemWidth, int itemActiveWidth) {
bottomNavigationTab.setIsNoTitleMode(isNoTitleMode);
bottomNavigationTab.setInactiveWidth(itemWidth);
bottomNavigationTab.setActiveWidth(i... | [
"private",
"void",
"setUpTab",
"(",
"boolean",
"isNoTitleMode",
",",
"BottomNavigationTab",
"bottomNavigationTab",
",",
"BottomNavigationItem",
"currentItem",
",",
"int",
"itemWidth",
",",
"int",
"itemActiveWidth",
")",
"{",
"bottomNavigationTab",
".",
"setIsNoTitleMode",... | Internal method to setup tabs
@param isNoTitleMode if no title mode is required
@param bottomNavigationTab Tab item
@param currentItem data structure for tab item
@param itemWidth tab item in-active width
@param itemActiveWidth tab item active width | [
"Internal",
"method",
"to",
"setup",
"tabs"
] | a5c486a6dfa1ebe7049e2e025e0d967111ecfd0b | https://github.com/Ashok-Varma/BottomNavigation/blob/a5c486a6dfa1ebe7049e2e025e0d967111ecfd0b/bottom-navigation-bar/src/main/java/com/ashokvarma/bottomnavigation/BottomNavigationBar.java#L492-L513 |
22,675 | Ashok-Varma/BottomNavigation | bottom-navigation-bar/src/main/java/com/ashokvarma/bottomnavigation/BottomNavigationBar.java | BottomNavigationBar.selectTabInternal | private void selectTabInternal(int newPosition, boolean firstTab, boolean callListener, boolean forcedSelection) {
int oldPosition = mSelectedPosition;
if (mSelectedPosition != newPosition) {
if (mBackgroundStyle == BACKGROUND_STYLE_STATIC) {
if (mSelectedPosition != -1)
... | java | private void selectTabInternal(int newPosition, boolean firstTab, boolean callListener, boolean forcedSelection) {
int oldPosition = mSelectedPosition;
if (mSelectedPosition != newPosition) {
if (mBackgroundStyle == BACKGROUND_STYLE_STATIC) {
if (mSelectedPosition != -1)
... | [
"private",
"void",
"selectTabInternal",
"(",
"int",
"newPosition",
",",
"boolean",
"firstTab",
",",
"boolean",
"callListener",
",",
"boolean",
"forcedSelection",
")",
"{",
"int",
"oldPosition",
"=",
"mSelectedPosition",
";",
"if",
"(",
"mSelectedPosition",
"!=",
"... | Internal Method to select a tab
@param newPosition to select a tab after bottom navigation bar is initialised
@param firstTab if firstTab the no ripple animation will be done
@param callListener is listener callbacks enabled for this change
@param forcedSelection if bottom navigation bar forced to select... | [
"Internal",
"Method",
"to",
"select",
"a",
"tab"
] | a5c486a6dfa1ebe7049e2e025e0d967111ecfd0b | https://github.com/Ashok-Varma/BottomNavigation/blob/a5c486a6dfa1ebe7049e2e025e0d967111ecfd0b/bottom-navigation-bar/src/main/java/com/ashokvarma/bottomnavigation/BottomNavigationBar.java#L523-L560 |
22,676 | Ashok-Varma/BottomNavigation | bottom-navigation-bar/src/main/java/com/ashokvarma/bottomnavigation/BottomNavigationBar.java | BottomNavigationBar.sendListenerCall | private void sendListenerCall(int oldPosition, int newPosition, boolean forcedSelection) {
if (mTabSelectedListener != null) {
// && oldPosition != -1) {
if (forcedSelection) {
mTabSelectedListener.onTabSelected(newPosition);
} else {
if (ol... | java | private void sendListenerCall(int oldPosition, int newPosition, boolean forcedSelection) {
if (mTabSelectedListener != null) {
// && oldPosition != -1) {
if (forcedSelection) {
mTabSelectedListener.onTabSelected(newPosition);
} else {
if (ol... | [
"private",
"void",
"sendListenerCall",
"(",
"int",
"oldPosition",
",",
"int",
"newPosition",
",",
"boolean",
"forcedSelection",
")",
"{",
"if",
"(",
"mTabSelectedListener",
"!=",
"null",
")",
"{",
"// && oldPosition != -1) {",
"if",
"(",
"forcedSelectio... | Internal method used to send callbacks to listener
@param oldPosition old selected tab position, -1 if this is first call
@param newPosition newly selected tab position
@param forcedSelection if bottom navigation bar forced to select tab (in this case call on selected irrespective of previous state | [
"Internal",
"method",
"used",
"to",
"send",
"callbacks",
"to",
"listener"
] | a5c486a6dfa1ebe7049e2e025e0d967111ecfd0b | https://github.com/Ashok-Varma/BottomNavigation/blob/a5c486a6dfa1ebe7049e2e025e0d967111ecfd0b/bottom-navigation-bar/src/main/java/com/ashokvarma/bottomnavigation/BottomNavigationBar.java#L569-L585 |
22,677 | Ashok-Varma/BottomNavigation | bottom-navigation-bar/src/main/java/com/ashokvarma/bottomnavigation/BadgeTextView.java | BadgeTextView.setDimens | void setDimens(int width, int height) {
mAreDimensOverridden = true;
mDesiredWidth = width;
mDesiredHeight = height;
requestLayout();
} | java | void setDimens(int width, int height) {
mAreDimensOverridden = true;
mDesiredWidth = width;
mDesiredHeight = height;
requestLayout();
} | [
"void",
"setDimens",
"(",
"int",
"width",
",",
"int",
"height",
")",
"{",
"mAreDimensOverridden",
"=",
"true",
";",
"mDesiredWidth",
"=",
"width",
";",
"mDesiredHeight",
"=",
"height",
";",
"requestLayout",
"(",
")",
";",
"}"
] | if width and height of the view needs to be changed
@param width new width that needs to be set
@param height new height that needs to be set | [
"if",
"width",
"and",
"height",
"of",
"the",
"view",
"needs",
"to",
"be",
"changed"
] | a5c486a6dfa1ebe7049e2e025e0d967111ecfd0b | https://github.com/Ashok-Varma/BottomNavigation/blob/a5c486a6dfa1ebe7049e2e025e0d967111ecfd0b/bottom-navigation-bar/src/main/java/com/ashokvarma/bottomnavigation/BadgeTextView.java#L63-L68 |
22,678 | Ashok-Varma/BottomNavigation | bottom-navigation-bar/src/main/java/com/ashokvarma/bottomnavigation/BottomNavigationHelper.java | BottomNavigationHelper.getMeasurementsForFixedMode | static int[] getMeasurementsForFixedMode(Context context, int screenWidth, int noOfTabs, boolean scrollable) {
int[] result = new int[2];
int minWidth = (int) context.getResources().getDimension(R.dimen.fixed_min_width_small_views);
int maxWidth = (int) context.getResources().getDimension(R.di... | java | static int[] getMeasurementsForFixedMode(Context context, int screenWidth, int noOfTabs, boolean scrollable) {
int[] result = new int[2];
int minWidth = (int) context.getResources().getDimension(R.dimen.fixed_min_width_small_views);
int maxWidth = (int) context.getResources().getDimension(R.di... | [
"static",
"int",
"[",
"]",
"getMeasurementsForFixedMode",
"(",
"Context",
"context",
",",
"int",
"screenWidth",
",",
"int",
"noOfTabs",
",",
"boolean",
"scrollable",
")",
"{",
"int",
"[",
"]",
"result",
"=",
"new",
"int",
"[",
"2",
"]",
";",
"int",
"minW... | Used to get Measurements for MODE_FIXED
@param context to fetch measurements
@param screenWidth total screen width
@param noOfTabs no of bottom bar tabs
@param scrollable is bottom bar scrollable
@return width of each tab | [
"Used",
"to",
"get",
"Measurements",
"for",
"MODE_FIXED"
] | a5c486a6dfa1ebe7049e2e025e0d967111ecfd0b | https://github.com/Ashok-Varma/BottomNavigation/blob/a5c486a6dfa1ebe7049e2e025e0d967111ecfd0b/bottom-navigation-bar/src/main/java/com/ashokvarma/bottomnavigation/BottomNavigationHelper.java#L35-L53 |
22,679 | Ashok-Varma/BottomNavigation | bottom-navigation-bar/src/main/java/com/ashokvarma/bottomnavigation/BottomNavigationHelper.java | BottomNavigationHelper.getMeasurementsForShiftingMode | static int[] getMeasurementsForShiftingMode(Context context, int screenWidth, int noOfTabs, boolean scrollable) {
int[] result = new int[2];
int minWidth = (int) context.getResources().getDimension(R.dimen.shifting_min_width_inactive);
int maxWidth = (int) context.getResources().getDimension(R... | java | static int[] getMeasurementsForShiftingMode(Context context, int screenWidth, int noOfTabs, boolean scrollable) {
int[] result = new int[2];
int minWidth = (int) context.getResources().getDimension(R.dimen.shifting_min_width_inactive);
int maxWidth = (int) context.getResources().getDimension(R... | [
"static",
"int",
"[",
"]",
"getMeasurementsForShiftingMode",
"(",
"Context",
"context",
",",
"int",
"screenWidth",
",",
"int",
"noOfTabs",
",",
"boolean",
"scrollable",
")",
"{",
"int",
"[",
"]",
"result",
"=",
"new",
"int",
"[",
"2",
"]",
";",
"int",
"m... | Used to get Measurements for MODE_SHIFTING
@param context to fetch measurements
@param screenWidth total screen width
@param noOfTabs no of bottom bar tabs
@param scrollable is bottom bar scrollable
@return min and max width of each tab | [
"Used",
"to",
"get",
"Measurements",
"for",
"MODE_SHIFTING"
] | a5c486a6dfa1ebe7049e2e025e0d967111ecfd0b | https://github.com/Ashok-Varma/BottomNavigation/blob/a5c486a6dfa1ebe7049e2e025e0d967111ecfd0b/bottom-navigation-bar/src/main/java/com/ashokvarma/bottomnavigation/BottomNavigationHelper.java#L64-L106 |
22,680 | Ashok-Varma/BottomNavigation | bottom-navigation-bar/src/main/java/com/ashokvarma/bottomnavigation/BottomNavigationHelper.java | BottomNavigationHelper.bindTabWithData | static void bindTabWithData(BottomNavigationItem bottomNavigationItem, BottomNavigationTab bottomNavigationTab, BottomNavigationBar bottomNavigationBar) {
Context context = bottomNavigationBar.getContext();
bottomNavigationTab.setLabel(bottomNavigationItem.getTitle(context));
bottomNavigationT... | java | static void bindTabWithData(BottomNavigationItem bottomNavigationItem, BottomNavigationTab bottomNavigationTab, BottomNavigationBar bottomNavigationBar) {
Context context = bottomNavigationBar.getContext();
bottomNavigationTab.setLabel(bottomNavigationItem.getTitle(context));
bottomNavigationT... | [
"static",
"void",
"bindTabWithData",
"(",
"BottomNavigationItem",
"bottomNavigationItem",
",",
"BottomNavigationTab",
"bottomNavigationTab",
",",
"BottomNavigationBar",
"bottomNavigationBar",
")",
"{",
"Context",
"context",
"=",
"bottomNavigationBar",
".",
"getContext",
"(",
... | Used to get set data to the Tab views from navigation items
@param bottomNavigationItem holds all the data
@param bottomNavigationTab view to which data need to be set
@param bottomNavigationBar view which holds all the tabs | [
"Used",
"to",
"get",
"set",
"data",
"to",
"the",
"Tab",
"views",
"from",
"navigation",
"items"
] | a5c486a6dfa1ebe7049e2e025e0d967111ecfd0b | https://github.com/Ashok-Varma/BottomNavigation/blob/a5c486a6dfa1ebe7049e2e025e0d967111ecfd0b/bottom-navigation-bar/src/main/java/com/ashokvarma/bottomnavigation/BottomNavigationHelper.java#L115-L150 |
22,681 | Ashok-Varma/BottomNavigation | bottom-navigation-bar/src/main/java/com/ashokvarma/bottomnavigation/BottomNavigationHelper.java | BottomNavigationHelper.setBackgroundWithRipple | static void setBackgroundWithRipple(View clickedView, final View backgroundView,
final View bgOverlay, final int newColor, int animationDuration) {
int centerX = (int) (clickedView.getX() + (clickedView.getMeasuredWidth() / 2));
int centerY = clickedView.getMeasur... | java | static void setBackgroundWithRipple(View clickedView, final View backgroundView,
final View bgOverlay, final int newColor, int animationDuration) {
int centerX = (int) (clickedView.getX() + (clickedView.getMeasuredWidth() / 2));
int centerY = clickedView.getMeasur... | [
"static",
"void",
"setBackgroundWithRipple",
"(",
"View",
"clickedView",
",",
"final",
"View",
"backgroundView",
",",
"final",
"View",
"bgOverlay",
",",
"final",
"int",
"newColor",
",",
"int",
"animationDuration",
")",
"{",
"int",
"centerX",
"=",
"(",
"int",
"... | Used to set the ripple animation when a tab is selected
@param clickedView the view that is clicked (to get dimens where ripple starts)
@param backgroundView temporary view to which final background color is set
@param bgOverlay temporary view which is animated to get ripple effect
@param newColor ... | [
"Used",
"to",
"set",
"the",
"ripple",
"animation",
"when",
"a",
"tab",
"is",
"selected"
] | a5c486a6dfa1ebe7049e2e025e0d967111ecfd0b | https://github.com/Ashok-Varma/BottomNavigation/blob/a5c486a6dfa1ebe7049e2e025e0d967111ecfd0b/bottom-navigation-bar/src/main/java/com/ashokvarma/bottomnavigation/BottomNavigationHelper.java#L161-L201 |
22,682 | raphw/byte-buddy | byte-buddy-gradle-plugin/src/main/java/net/bytebuddy/build/gradle/AbstractUserConfiguration.java | AbstractUserConfiguration.getClassPath | public Iterable<? extends File> getClassPath(File root, Iterable<? extends File> classPath) {
return this.classPath == null
? new PrefixIterable(root, classPath)
: this.classPath;
} | java | public Iterable<? extends File> getClassPath(File root, Iterable<? extends File> classPath) {
return this.classPath == null
? new PrefixIterable(root, classPath)
: this.classPath;
} | [
"public",
"Iterable",
"<",
"?",
"extends",
"File",
">",
"getClassPath",
"(",
"File",
"root",
",",
"Iterable",
"<",
"?",
"extends",
"File",
">",
"classPath",
")",
"{",
"return",
"this",
".",
"classPath",
"==",
"null",
"?",
"new",
"PrefixIterable",
"(",
"r... | Returns the class path or builds a class path from the supplied arguments if no class path was set.
@param root The root directory of the project being built.
@param classPath The class path dependencies.
@return An iterable of all elements of the class path to be used. | [
"Returns",
"the",
"class",
"path",
"or",
"builds",
"a",
"class",
"path",
"from",
"the",
"supplied",
"arguments",
"if",
"no",
"class",
"path",
"was",
"set",
"."
] | 4d2dac80efb6bed89367567260f6811c2f712d12 | https://github.com/raphw/byte-buddy/blob/4d2dac80efb6bed89367567260f6811c2f712d12/byte-buddy-gradle-plugin/src/main/java/net/bytebuddy/build/gradle/AbstractUserConfiguration.java#L38-L42 |
22,683 | raphw/byte-buddy | byte-buddy-dep/src/main/java/net/bytebuddy/implementation/DefaultMethodCall.java | DefaultMethodCall.filterRelevant | private List<TypeDescription> filterRelevant(TypeDescription typeDescription) {
List<TypeDescription> filtered = new ArrayList<TypeDescription>(prioritizedInterfaces.size());
Set<TypeDescription> relevant = new HashSet<TypeDescription>(typeDescription.getInterfaces().asErasures());
for (TypeDesc... | java | private List<TypeDescription> filterRelevant(TypeDescription typeDescription) {
List<TypeDescription> filtered = new ArrayList<TypeDescription>(prioritizedInterfaces.size());
Set<TypeDescription> relevant = new HashSet<TypeDescription>(typeDescription.getInterfaces().asErasures());
for (TypeDesc... | [
"private",
"List",
"<",
"TypeDescription",
">",
"filterRelevant",
"(",
"TypeDescription",
"typeDescription",
")",
"{",
"List",
"<",
"TypeDescription",
">",
"filtered",
"=",
"new",
"ArrayList",
"<",
"TypeDescription",
">",
"(",
"prioritizedInterfaces",
".",
"size",
... | Filters the relevant prioritized interfaces for a given type, i.e. finds the types that are
directly declared on a given instrumented type.
@param typeDescription The instrumented type for which the prioritized interfaces are to be filtered.
@return A list of prioritized interfaces that are additionally implemented by... | [
"Filters",
"the",
"relevant",
"prioritized",
"interfaces",
"for",
"a",
"given",
"type",
"i",
".",
"e",
".",
"finds",
"the",
"types",
"that",
"are",
"directly",
"declared",
"on",
"a",
"given",
"instrumented",
"type",
"."
] | 4d2dac80efb6bed89367567260f6811c2f712d12 | https://github.com/raphw/byte-buddy/blob/4d2dac80efb6bed89367567260f6811c2f712d12/byte-buddy-dep/src/main/java/net/bytebuddy/implementation/DefaultMethodCall.java#L165-L174 |
22,684 | raphw/byte-buddy | byte-buddy-dep/src/main/java/net/bytebuddy/matcher/ElementMatchers.java | ElementMatchers.definedField | public static <T extends FieldDescription> ElementMatcher.Junction<T> definedField(ElementMatcher<? super FieldDescription.InDefinedShape> matcher) {
return new DefinedShapeMatcher<T, FieldDescription.InDefinedShape>(matcher);
} | java | public static <T extends FieldDescription> ElementMatcher.Junction<T> definedField(ElementMatcher<? super FieldDescription.InDefinedShape> matcher) {
return new DefinedShapeMatcher<T, FieldDescription.InDefinedShape>(matcher);
} | [
"public",
"static",
"<",
"T",
"extends",
"FieldDescription",
">",
"ElementMatcher",
".",
"Junction",
"<",
"T",
">",
"definedField",
"(",
"ElementMatcher",
"<",
"?",
"super",
"FieldDescription",
".",
"InDefinedShape",
">",
"matcher",
")",
"{",
"return",
"new",
... | Matches a field in its defined shape.
@param matcher The matcher to apply to the matched field's defined shape.
@param <T> The matched object's type.
@return A matcher that matches a matched field's defined shape. | [
"Matches",
"a",
"field",
"in",
"its",
"defined",
"shape",
"."
] | 4d2dac80efb6bed89367567260f6811c2f712d12 | https://github.com/raphw/byte-buddy/blob/4d2dac80efb6bed89367567260f6811c2f712d12/byte-buddy-dep/src/main/java/net/bytebuddy/matcher/ElementMatchers.java#L161-L163 |
22,685 | raphw/byte-buddy | byte-buddy-dep/src/main/java/net/bytebuddy/matcher/ElementMatchers.java | ElementMatchers.definedMethod | public static <T extends MethodDescription> ElementMatcher.Junction<T> definedMethod(ElementMatcher<? super MethodDescription.InDefinedShape> matcher) {
return new DefinedShapeMatcher<T, MethodDescription.InDefinedShape>(matcher);
} | java | public static <T extends MethodDescription> ElementMatcher.Junction<T> definedMethod(ElementMatcher<? super MethodDescription.InDefinedShape> matcher) {
return new DefinedShapeMatcher<T, MethodDescription.InDefinedShape>(matcher);
} | [
"public",
"static",
"<",
"T",
"extends",
"MethodDescription",
">",
"ElementMatcher",
".",
"Junction",
"<",
"T",
">",
"definedMethod",
"(",
"ElementMatcher",
"<",
"?",
"super",
"MethodDescription",
".",
"InDefinedShape",
">",
"matcher",
")",
"{",
"return",
"new",... | Matches a method in its defined shape.
@param matcher The matcher to apply to the matched method's defined shape.
@param <T> The matched object's type.
@return A matcher that matches a matched method's defined shape. | [
"Matches",
"a",
"method",
"in",
"its",
"defined",
"shape",
"."
] | 4d2dac80efb6bed89367567260f6811c2f712d12 | https://github.com/raphw/byte-buddy/blob/4d2dac80efb6bed89367567260f6811c2f712d12/byte-buddy-dep/src/main/java/net/bytebuddy/matcher/ElementMatchers.java#L205-L207 |
22,686 | raphw/byte-buddy | byte-buddy-dep/src/main/java/net/bytebuddy/matcher/ElementMatchers.java | ElementMatchers.definedParameter | public static <T extends ParameterDescription> ElementMatcher.Junction<T> definedParameter(ElementMatcher<? super ParameterDescription.InDefinedShape> matcher) {
return new DefinedShapeMatcher<T, ParameterDescription.InDefinedShape>(matcher);
} | java | public static <T extends ParameterDescription> ElementMatcher.Junction<T> definedParameter(ElementMatcher<? super ParameterDescription.InDefinedShape> matcher) {
return new DefinedShapeMatcher<T, ParameterDescription.InDefinedShape>(matcher);
} | [
"public",
"static",
"<",
"T",
"extends",
"ParameterDescription",
">",
"ElementMatcher",
".",
"Junction",
"<",
"T",
">",
"definedParameter",
"(",
"ElementMatcher",
"<",
"?",
"super",
"ParameterDescription",
".",
"InDefinedShape",
">",
"matcher",
")",
"{",
"return",... | Matches a parameter in its defined shape.
@param matcher The matcher to apply to the matched parameter's defined shape.
@param <T> The matched object's type.
@return A matcher that matches a matched parameter's defined shape. | [
"Matches",
"a",
"parameter",
"in",
"its",
"defined",
"shape",
"."
] | 4d2dac80efb6bed89367567260f6811c2f712d12 | https://github.com/raphw/byte-buddy/blob/4d2dac80efb6bed89367567260f6811c2f712d12/byte-buddy-dep/src/main/java/net/bytebuddy/matcher/ElementMatchers.java#L227-L229 |
22,687 | raphw/byte-buddy | byte-buddy-dep/src/main/java/net/bytebuddy/matcher/ElementMatchers.java | ElementMatchers.hasType | public static <T extends ParameterDescription> ElementMatcher.Junction<T> hasType(ElementMatcher<? super TypeDescription> matcher) {
return hasGenericType(erasure(matcher));
} | java | public static <T extends ParameterDescription> ElementMatcher.Junction<T> hasType(ElementMatcher<? super TypeDescription> matcher) {
return hasGenericType(erasure(matcher));
} | [
"public",
"static",
"<",
"T",
"extends",
"ParameterDescription",
">",
"ElementMatcher",
".",
"Junction",
"<",
"T",
">",
"hasType",
"(",
"ElementMatcher",
"<",
"?",
"super",
"TypeDescription",
">",
"matcher",
")",
"{",
"return",
"hasGenericType",
"(",
"erasure",
... | Matches a parameter's type by the given matcher.
@param matcher The matcher to apply to the parameter's type.
@param <T> The type of the matched object.
@return A matcher that matches a parameter's type by the given matcher. | [
"Matches",
"a",
"parameter",
"s",
"type",
"by",
"the",
"given",
"matcher",
"."
] | 4d2dac80efb6bed89367567260f6811c2f712d12 | https://github.com/raphw/byte-buddy/blob/4d2dac80efb6bed89367567260f6811c2f712d12/byte-buddy-dep/src/main/java/net/bytebuddy/matcher/ElementMatchers.java#L238-L240 |
22,688 | raphw/byte-buddy | byte-buddy-dep/src/main/java/net/bytebuddy/matcher/ElementMatchers.java | ElementMatchers.hasGenericType | public static <T extends ParameterDescription> ElementMatcher.Junction<T> hasGenericType(ElementMatcher<? super TypeDescription.Generic> matcher) {
return new MethodParameterTypeMatcher<T>(matcher);
} | java | public static <T extends ParameterDescription> ElementMatcher.Junction<T> hasGenericType(ElementMatcher<? super TypeDescription.Generic> matcher) {
return new MethodParameterTypeMatcher<T>(matcher);
} | [
"public",
"static",
"<",
"T",
"extends",
"ParameterDescription",
">",
"ElementMatcher",
".",
"Junction",
"<",
"T",
">",
"hasGenericType",
"(",
"ElementMatcher",
"<",
"?",
"super",
"TypeDescription",
".",
"Generic",
">",
"matcher",
")",
"{",
"return",
"new",
"M... | Matches a method parameter by its generic type.
@param matcher The matcher to apply to a parameter's generic type.
@param <T> The type of the matched object.
@return A matcher that matches the matched parameter's generic type. | [
"Matches",
"a",
"method",
"parameter",
"by",
"its",
"generic",
"type",
"."
] | 4d2dac80efb6bed89367567260f6811c2f712d12 | https://github.com/raphw/byte-buddy/blob/4d2dac80efb6bed89367567260f6811c2f712d12/byte-buddy-dep/src/main/java/net/bytebuddy/matcher/ElementMatchers.java#L249-L251 |
22,689 | raphw/byte-buddy | byte-buddy-dep/src/main/java/net/bytebuddy/matcher/ElementMatchers.java | ElementMatchers.not | public static <T> ElementMatcher.Junction<T> not(ElementMatcher<? super T> matcher) {
return new NegatingMatcher<T>(matcher);
} | java | public static <T> ElementMatcher.Junction<T> not(ElementMatcher<? super T> matcher) {
return new NegatingMatcher<T>(matcher);
} | [
"public",
"static",
"<",
"T",
">",
"ElementMatcher",
".",
"Junction",
"<",
"T",
">",
"not",
"(",
"ElementMatcher",
"<",
"?",
"super",
"T",
">",
"matcher",
")",
"{",
"return",
"new",
"NegatingMatcher",
"<",
"T",
">",
"(",
"matcher",
")",
";",
"}"
] | Inverts another matcher.
@param matcher The matcher to invert.
@param <T> The type of the matched object.
@return An inverted version of the given {@code matcher}. | [
"Inverts",
"another",
"matcher",
"."
] | 4d2dac80efb6bed89367567260f6811c2f712d12 | https://github.com/raphw/byte-buddy/blob/4d2dac80efb6bed89367567260f6811c2f712d12/byte-buddy-dep/src/main/java/net/bytebuddy/matcher/ElementMatchers.java#L292-L294 |
22,690 | raphw/byte-buddy | byte-buddy-dep/src/main/java/net/bytebuddy/matcher/ElementMatchers.java | ElementMatchers.whereAny | public static <T> ElementMatcher.Junction<Iterable<? extends T>> whereAny(ElementMatcher<? super T> matcher) {
return new CollectionItemMatcher<T>(matcher);
} | java | public static <T> ElementMatcher.Junction<Iterable<? extends T>> whereAny(ElementMatcher<? super T> matcher) {
return new CollectionItemMatcher<T>(matcher);
} | [
"public",
"static",
"<",
"T",
">",
"ElementMatcher",
".",
"Junction",
"<",
"Iterable",
"<",
"?",
"extends",
"T",
">",
">",
"whereAny",
"(",
"ElementMatcher",
"<",
"?",
"super",
"T",
">",
"matcher",
")",
"{",
"return",
"new",
"CollectionItemMatcher",
"<",
... | Matches an iterable by assuring that at least one element of the iterable collection matches the
provided matcher.
@param matcher The matcher to apply to each element.
@param <T> The type of the matched object.
@return A matcher that matches an iterable if at least one element matches the provided matcher. | [
"Matches",
"an",
"iterable",
"by",
"assuring",
"that",
"at",
"least",
"one",
"element",
"of",
"the",
"iterable",
"collection",
"matches",
"the",
"provided",
"matcher",
"."
] | 4d2dac80efb6bed89367567260f6811c2f712d12 | https://github.com/raphw/byte-buddy/blob/4d2dac80efb6bed89367567260f6811c2f712d12/byte-buddy-dep/src/main/java/net/bytebuddy/matcher/ElementMatchers.java#L520-L522 |
22,691 | raphw/byte-buddy | byte-buddy-dep/src/main/java/net/bytebuddy/matcher/ElementMatchers.java | ElementMatchers.whereNone | public static <T> ElementMatcher.Junction<Iterable<? extends T>> whereNone(ElementMatcher<? super T> matcher) {
return not(whereAny(matcher));
} | java | public static <T> ElementMatcher.Junction<Iterable<? extends T>> whereNone(ElementMatcher<? super T> matcher) {
return not(whereAny(matcher));
} | [
"public",
"static",
"<",
"T",
">",
"ElementMatcher",
".",
"Junction",
"<",
"Iterable",
"<",
"?",
"extends",
"T",
">",
">",
"whereNone",
"(",
"ElementMatcher",
"<",
"?",
"super",
"T",
">",
"matcher",
")",
"{",
"return",
"not",
"(",
"whereAny",
"(",
"mat... | Matches an iterable by assuring that no element of the iterable collection matches the provided matcher.
@param matcher The matcher to apply to each element.
@param <T> The type of the matched object.
@return A matcher that matches an iterable if no element matches the provided matcher. | [
"Matches",
"an",
"iterable",
"by",
"assuring",
"that",
"no",
"element",
"of",
"the",
"iterable",
"collection",
"matches",
"the",
"provided",
"matcher",
"."
] | 4d2dac80efb6bed89367567260f6811c2f712d12 | https://github.com/raphw/byte-buddy/blob/4d2dac80efb6bed89367567260f6811c2f712d12/byte-buddy-dep/src/main/java/net/bytebuddy/matcher/ElementMatchers.java#L531-L533 |
22,692 | raphw/byte-buddy | byte-buddy-dep/src/main/java/net/bytebuddy/matcher/ElementMatchers.java | ElementMatchers.erasure | public static <T extends TypeDescription.Generic> ElementMatcher.Junction<T> erasure(Class<?> type) {
return erasure(is(type));
} | java | public static <T extends TypeDescription.Generic> ElementMatcher.Junction<T> erasure(Class<?> type) {
return erasure(is(type));
} | [
"public",
"static",
"<",
"T",
"extends",
"TypeDescription",
".",
"Generic",
">",
"ElementMatcher",
".",
"Junction",
"<",
"T",
">",
"erasure",
"(",
"Class",
"<",
"?",
">",
"type",
")",
"{",
"return",
"erasure",
"(",
"is",
"(",
"type",
")",
")",
";",
"... | Matches a generic type's erasure against the provided type. As a wildcard does not define an erasure, a runtime exception is thrown when
this matcher is applied to a wildcard.
@param type The type to match a generic type's erasure against.
@param <T> The type of the matched object.
@return A matcher that matches a ge... | [
"Matches",
"a",
"generic",
"type",
"s",
"erasure",
"against",
"the",
"provided",
"type",
".",
"As",
"a",
"wildcard",
"does",
"not",
"define",
"an",
"erasure",
"a",
"runtime",
"exception",
"is",
"thrown",
"when",
"this",
"matcher",
"is",
"applied",
"to",
"a... | 4d2dac80efb6bed89367567260f6811c2f712d12 | https://github.com/raphw/byte-buddy/blob/4d2dac80efb6bed89367567260f6811c2f712d12/byte-buddy-dep/src/main/java/net/bytebuddy/matcher/ElementMatchers.java#L543-L545 |
22,693 | raphw/byte-buddy | byte-buddy-dep/src/main/java/net/bytebuddy/matcher/ElementMatchers.java | ElementMatchers.erasure | public static <T extends TypeDescription.Generic> ElementMatcher.Junction<T> erasure(ElementMatcher<? super TypeDescription> matcher) {
return new ErasureMatcher<T>(matcher);
} | java | public static <T extends TypeDescription.Generic> ElementMatcher.Junction<T> erasure(ElementMatcher<? super TypeDescription> matcher) {
return new ErasureMatcher<T>(matcher);
} | [
"public",
"static",
"<",
"T",
"extends",
"TypeDescription",
".",
"Generic",
">",
"ElementMatcher",
".",
"Junction",
"<",
"T",
">",
"erasure",
"(",
"ElementMatcher",
"<",
"?",
"super",
"TypeDescription",
">",
"matcher",
")",
"{",
"return",
"new",
"ErasureMatche... | Converts a matcher for a type description into a matcher for the matched type's erasure. As a wildcard does not define an erasure,
a runtime exception is thrown when this matcher is applied to a wildcard.
@param matcher The matcher to match the matched object's raw type against.
@param <T> The type of the matched ... | [
"Converts",
"a",
"matcher",
"for",
"a",
"type",
"description",
"into",
"a",
"matcher",
"for",
"the",
"matched",
"type",
"s",
"erasure",
".",
"As",
"a",
"wildcard",
"does",
"not",
"define",
"an",
"erasure",
"a",
"runtime",
"exception",
"is",
"thrown",
"when... | 4d2dac80efb6bed89367567260f6811c2f712d12 | https://github.com/raphw/byte-buddy/blob/4d2dac80efb6bed89367567260f6811c2f712d12/byte-buddy-dep/src/main/java/net/bytebuddy/matcher/ElementMatchers.java#L567-L569 |
22,694 | raphw/byte-buddy | byte-buddy-dep/src/main/java/net/bytebuddy/matcher/ElementMatchers.java | ElementMatchers.erasures | public static <T extends Iterable<? extends TypeDescription.Generic>> ElementMatcher.Junction<T> erasures(
ElementMatcher<? super Iterable<? extends TypeDescription>> matcher) {
return new CollectionErasureMatcher<T>(matcher);
} | java | public static <T extends Iterable<? extends TypeDescription.Generic>> ElementMatcher.Junction<T> erasures(
ElementMatcher<? super Iterable<? extends TypeDescription>> matcher) {
return new CollectionErasureMatcher<T>(matcher);
} | [
"public",
"static",
"<",
"T",
"extends",
"Iterable",
"<",
"?",
"extends",
"TypeDescription",
".",
"Generic",
">",
">",
"ElementMatcher",
".",
"Junction",
"<",
"T",
">",
"erasures",
"(",
"ElementMatcher",
"<",
"?",
"super",
"Iterable",
"<",
"?",
"extends",
... | Applies the provided matchers to an iteration og generic types' erasures. As a wildcard does not define an erasure, a runtime
exception is thrown when this matcher is applied to a wildcard.
@param matcher The matcher to apply at the erased types.
@param <T> The type of the matched object.
@return A matcher that ma... | [
"Applies",
"the",
"provided",
"matchers",
"to",
"an",
"iteration",
"og",
"generic",
"types",
"erasures",
".",
"As",
"a",
"wildcard",
"does",
"not",
"define",
"an",
"erasure",
"a",
"runtime",
"exception",
"is",
"thrown",
"when",
"this",
"matcher",
"is",
"appl... | 4d2dac80efb6bed89367567260f6811c2f712d12 | https://github.com/raphw/byte-buddy/blob/4d2dac80efb6bed89367567260f6811c2f712d12/byte-buddy-dep/src/main/java/net/bytebuddy/matcher/ElementMatchers.java#L620-L623 |
22,695 | raphw/byte-buddy | byte-buddy-dep/src/main/java/net/bytebuddy/matcher/ElementMatchers.java | ElementMatchers.returns | public static <T extends MethodDescription> ElementMatcher.Junction<T> returns(ElementMatcher<? super TypeDescription> matcher) {
return returnsGeneric(erasure(matcher));
} | java | public static <T extends MethodDescription> ElementMatcher.Junction<T> returns(ElementMatcher<? super TypeDescription> matcher) {
return returnsGeneric(erasure(matcher));
} | [
"public",
"static",
"<",
"T",
"extends",
"MethodDescription",
">",
"ElementMatcher",
".",
"Junction",
"<",
"T",
">",
"returns",
"(",
"ElementMatcher",
"<",
"?",
"super",
"TypeDescription",
">",
"matcher",
")",
"{",
"return",
"returnsGeneric",
"(",
"erasure",
"... | Matches a method's return type's erasure by the given matcher.
@param matcher The matcher to apply to a method's return type's erasure.
@param <T> The type of the matched object.
@return A matcher that matches the matched method's return type's erasure. | [
"Matches",
"a",
"method",
"s",
"return",
"type",
"s",
"erasure",
"by",
"the",
"given",
"matcher",
"."
] | 4d2dac80efb6bed89367567260f6811c2f712d12 | https://github.com/raphw/byte-buddy/blob/4d2dac80efb6bed89367567260f6811c2f712d12/byte-buddy-dep/src/main/java/net/bytebuddy/matcher/ElementMatchers.java#L1135-L1137 |
22,696 | raphw/byte-buddy | byte-buddy-dep/src/main/java/net/bytebuddy/matcher/ElementMatchers.java | ElementMatchers.declaresGenericException | public static <T extends MethodDescription> ElementMatcher.Junction<T> declaresGenericException(
ElementMatcher<? super Iterable<? extends TypeDescription.Generic>> matcher) {
return new MethodExceptionTypeMatcher<T>(matcher);
} | java | public static <T extends MethodDescription> ElementMatcher.Junction<T> declaresGenericException(
ElementMatcher<? super Iterable<? extends TypeDescription.Generic>> matcher) {
return new MethodExceptionTypeMatcher<T>(matcher);
} | [
"public",
"static",
"<",
"T",
"extends",
"MethodDescription",
">",
"ElementMatcher",
".",
"Junction",
"<",
"T",
">",
"declaresGenericException",
"(",
"ElementMatcher",
"<",
"?",
"super",
"Iterable",
"<",
"?",
"extends",
"TypeDescription",
".",
"Generic",
">",
">... | Matches a method's generic exception types against the provided matcher.
@param matcher The exception matcher to apply onto the matched method's generic exceptions.
@param <T> The type of the matched object.
@return A matcher that applies the provided matcher to a method's generic exception types. | [
"Matches",
"a",
"method",
"s",
"generic",
"exception",
"types",
"against",
"the",
"provided",
"matcher",
"."
] | 4d2dac80efb6bed89367567260f6811c2f712d12 | https://github.com/raphw/byte-buddy/blob/4d2dac80efb6bed89367567260f6811c2f712d12/byte-buddy-dep/src/main/java/net/bytebuddy/matcher/ElementMatchers.java#L1427-L1430 |
22,697 | raphw/byte-buddy | byte-buddy-dep/src/main/java/net/bytebuddy/matcher/ElementMatchers.java | ElementMatchers.isVirtual | public static <T extends MethodDescription> ElementMatcher.Junction<T> isVirtual() {
return new MethodSortMatcher<T>(MethodSortMatcher.Sort.VIRTUAL);
} | java | public static <T extends MethodDescription> ElementMatcher.Junction<T> isVirtual() {
return new MethodSortMatcher<T>(MethodSortMatcher.Sort.VIRTUAL);
} | [
"public",
"static",
"<",
"T",
"extends",
"MethodDescription",
">",
"ElementMatcher",
".",
"Junction",
"<",
"T",
">",
"isVirtual",
"(",
")",
"{",
"return",
"new",
"MethodSortMatcher",
"<",
"T",
">",
"(",
"MethodSortMatcher",
".",
"Sort",
".",
"VIRTUAL",
")",
... | Matches any method that is virtual, i.e. non-constructors that are non-static and non-private.
@param <T> The type of the matched object.
@return A matcher for virtual methods. | [
"Matches",
"any",
"method",
"that",
"is",
"virtual",
"i",
".",
"e",
".",
"non",
"-",
"constructors",
"that",
"are",
"non",
"-",
"static",
"and",
"non",
"-",
"private",
"."
] | 4d2dac80efb6bed89367567260f6811c2f712d12 | https://github.com/raphw/byte-buddy/blob/4d2dac80efb6bed89367567260f6811c2f712d12/byte-buddy-dep/src/main/java/net/bytebuddy/matcher/ElementMatchers.java#L1557-L1559 |
22,698 | raphw/byte-buddy | byte-buddy-dep/src/main/java/net/bytebuddy/matcher/ElementMatchers.java | ElementMatchers.isDefaultMethod | public static <T extends MethodDescription> ElementMatcher.Junction<T> isDefaultMethod() {
return new MethodSortMatcher<T>(MethodSortMatcher.Sort.DEFAULT_METHOD);
} | java | public static <T extends MethodDescription> ElementMatcher.Junction<T> isDefaultMethod() {
return new MethodSortMatcher<T>(MethodSortMatcher.Sort.DEFAULT_METHOD);
} | [
"public",
"static",
"<",
"T",
"extends",
"MethodDescription",
">",
"ElementMatcher",
".",
"Junction",
"<",
"T",
">",
"isDefaultMethod",
"(",
")",
"{",
"return",
"new",
"MethodSortMatcher",
"<",
"T",
">",
"(",
"MethodSortMatcher",
".",
"Sort",
".",
"DEFAULT_MET... | Only matches Java 8 default methods.
@param <T> The type of the matched object.
@return A matcher that only matches Java 8 default methods. | [
"Only",
"matches",
"Java",
"8",
"default",
"methods",
"."
] | 4d2dac80efb6bed89367567260f6811c2f712d12 | https://github.com/raphw/byte-buddy/blob/4d2dac80efb6bed89367567260f6811c2f712d12/byte-buddy-dep/src/main/java/net/bytebuddy/matcher/ElementMatchers.java#L1567-L1569 |
22,699 | raphw/byte-buddy | byte-buddy-dep/src/main/java/net/bytebuddy/matcher/ElementMatchers.java | ElementMatchers.isSetter | public static <T extends MethodDescription> ElementMatcher.Junction<T> isSetter() {
return nameStartsWith("set").and(takesArguments(1)).and(returns(TypeDescription.VOID));
} | java | public static <T extends MethodDescription> ElementMatcher.Junction<T> isSetter() {
return nameStartsWith("set").and(takesArguments(1)).and(returns(TypeDescription.VOID));
} | [
"public",
"static",
"<",
"T",
"extends",
"MethodDescription",
">",
"ElementMatcher",
".",
"Junction",
"<",
"T",
">",
"isSetter",
"(",
")",
"{",
"return",
"nameStartsWith",
"(",
"\"set\"",
")",
".",
"and",
"(",
"takesArguments",
"(",
"1",
")",
")",
".",
"... | Matches any Java bean setter method.
@param <T> The type of the matched object.
@return A matcher that matches any setter method. | [
"Matches",
"any",
"Java",
"bean",
"setter",
"method",
"."
] | 4d2dac80efb6bed89367567260f6811c2f712d12 | https://github.com/raphw/byte-buddy/blob/4d2dac80efb6bed89367567260f6811c2f712d12/byte-buddy-dep/src/main/java/net/bytebuddy/matcher/ElementMatchers.java#L1647-L1649 |
Subsets and Splits
No community queries yet
The top public SQL queries from the community will appear here once available.