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
26,400
spring-projects/spring-loaded
springloaded/src/main/java/org/springsource/loaded/TypeRegistry.java
TypeRegistry.getTypeRegistryFor
public static TypeRegistry getTypeRegistryFor(ClassLoader classloader) { if (classloader == null) { return null; } //WeakReference<TypeRegistry> existingRegistryRef = loaderToRegistryMap.get(classloader); TypeRegistry existingRegistry = loaderToRegistryMap.get(classloader);//existingRegistryRef==null?null:ex...
java
public static TypeRegistry getTypeRegistryFor(ClassLoader classloader) { if (classloader == null) { return null; } //WeakReference<TypeRegistry> existingRegistryRef = loaderToRegistryMap.get(classloader); TypeRegistry existingRegistry = loaderToRegistryMap.get(classloader);//existingRegistryRef==null?null:ex...
[ "public", "static", "TypeRegistry", "getTypeRegistryFor", "(", "ClassLoader", "classloader", ")", "{", "if", "(", "classloader", "==", "null", ")", "{", "return", "null", ";", "}", "//WeakReference<TypeRegistry> existingRegistryRef = loaderToRegistryMap.get(classloader);", ...
Factory access method for obtaining TypeRegistry instances. Returns a TypeRegistry for the specified classloader. @param classloader The classloader to create/retrieve the type registry for @return the TypeRegistry for the classloader
[ "Factory", "access", "method", "for", "obtaining", "TypeRegistry", "instances", ".", "Returns", "a", "TypeRegistry", "for", "the", "specified", "classloader", "." ]
59b32f957a05c6d9f149148158053605e2a6205a
https://github.com/spring-projects/spring-loaded/blob/59b32f957a05c6d9f149148158053605e2a6205a/springloaded/src/main/java/org/springsource/loaded/TypeRegistry.java#L254-L317
26,401
spring-projects/spring-loaded
springloaded/src/main/java/org/springsource/loaded/TypeRegistry.java
TypeRegistry.loadPlugins
private void loadPlugins() { // Read the plugin class names from well known resources try { Enumeration<URL> pluginResources = classLoader.get().getResources( "META-INF/services/org.springsource.reloading.agent.Plugins"); while (pluginResources.hasMoreElements()) { URL pluginResource = pluginResource...
java
private void loadPlugins() { // Read the plugin class names from well known resources try { Enumeration<URL> pluginResources = classLoader.get().getResources( "META-INF/services/org.springsource.reloading.agent.Plugins"); while (pluginResources.hasMoreElements()) { URL pluginResource = pluginResource...
[ "private", "void", "loadPlugins", "(", ")", "{", "// Read the plugin class names from well known resources", "try", "{", "Enumeration", "<", "URL", ">", "pluginResources", "=", "classLoader", ".", "get", "(", ")", ".", "getResources", "(", "\"META-INF/services/org.sprin...
Determine if any plugins are visible from the attached classloader
[ "Determine", "if", "any", "plugins", "are", "visible", "from", "the", "attached", "classloader" ]
59b32f957a05c6d9f149148158053605e2a6205a
https://github.com/spring-projects/spring-loaded/blob/59b32f957a05c6d9f149148158053605e2a6205a/springloaded/src/main/java/org/springsource/loaded/TypeRegistry.java#L392-L440
26,402
spring-projects/spring-loaded
springloaded/src/main/java/org/springsource/loaded/TypeRegistry.java
TypeRegistry.parseRebasePaths
private void parseRebasePaths(String rebaseDefinitions) { StringTokenizer tokenizer = new StringTokenizer(rebaseDefinitions, ","); while (tokenizer.hasMoreTokens()) { String rebasePair = tokenizer.nextToken(); int equals = rebasePair.indexOf('='); String fromPrefix = rebasePair.substring(0, equals); Str...
java
private void parseRebasePaths(String rebaseDefinitions) { StringTokenizer tokenizer = new StringTokenizer(rebaseDefinitions, ","); while (tokenizer.hasMoreTokens()) { String rebasePair = tokenizer.nextToken(); int equals = rebasePair.indexOf('='); String fromPrefix = rebasePair.substring(0, equals); Str...
[ "private", "void", "parseRebasePaths", "(", "String", "rebaseDefinitions", ")", "{", "StringTokenizer", "tokenizer", "=", "new", "StringTokenizer", "(", "rebaseDefinitions", ",", "\",\"", ")", ";", "while", "(", "tokenizer", ".", "hasMoreTokens", "(", ")", ")", ...
Process a set of rebase definitions of the form 'a=b,c=d,e=f'.
[ "Process", "a", "set", "of", "rebase", "definitions", "of", "the", "form", "a", "=", "b", "c", "=", "d", "e", "=", "f", "." ]
59b32f957a05c6d9f149148158053605e2a6205a
https://github.com/spring-projects/spring-loaded/blob/59b32f957a05c6d9f149148158053605e2a6205a/springloaded/src/main/java/org/springsource/loaded/TypeRegistry.java#L518-L531
26,403
spring-projects/spring-loaded
springloaded/src/main/java/org/springsource/loaded/TypeRegistry.java
TypeRegistry.getTypeIdFor
public int getTypeIdFor(String slashname, boolean allocateIfNotFound) { if (allocateIfNotFound) { return NameRegistry.getIdOrAllocateFor(slashname); } else { return NameRegistry.getIdFor(slashname); } }
java
public int getTypeIdFor(String slashname, boolean allocateIfNotFound) { if (allocateIfNotFound) { return NameRegistry.getIdOrAllocateFor(slashname); } else { return NameRegistry.getIdFor(slashname); } }
[ "public", "int", "getTypeIdFor", "(", "String", "slashname", ",", "boolean", "allocateIfNotFound", ")", "{", "if", "(", "allocateIfNotFound", ")", "{", "return", "NameRegistry", ".", "getIdOrAllocateFor", "(", "slashname", ")", ";", "}", "else", "{", "return", ...
Lookup the type ID for a string. First checks those allocated but not yet registered, then those that are already registered. If not found then a new one is allocated and recorded. @param slashname the slashed type name, eg. a/b/c/D @param allocateIfNotFound determines whether an id should be allocated for the type if...
[ "Lookup", "the", "type", "ID", "for", "a", "string", ".", "First", "checks", "those", "allocated", "but", "not", "yet", "registered", "then", "those", "that", "are", "already", "registered", ".", "If", "not", "found", "then", "a", "new", "one", "is", "al...
59b32f957a05c6d9f149148158053605e2a6205a
https://github.com/spring-projects/spring-loaded/blob/59b32f957a05c6d9f149148158053605e2a6205a/springloaded/src/main/java/org/springsource/loaded/TypeRegistry.java#L986-L993
26,404
spring-projects/spring-loaded
springloaded/src/main/java/org/springsource/loaded/TypeRegistry.java
TypeRegistry.rememberReloadableType
public void rememberReloadableType(int typeId, ReloadableType rtype) { if (typeId >= reloadableTypes.length) { resizeReloadableTypeArray(typeId); } reloadableTypes[typeId] = rtype; if ((typeId + 1) > reloadableTypesSize) { reloadableTypesSize = typeId + 1; } }
java
public void rememberReloadableType(int typeId, ReloadableType rtype) { if (typeId >= reloadableTypes.length) { resizeReloadableTypeArray(typeId); } reloadableTypes[typeId] = rtype; if ((typeId + 1) > reloadableTypesSize) { reloadableTypesSize = typeId + 1; } }
[ "public", "void", "rememberReloadableType", "(", "int", "typeId", ",", "ReloadableType", "rtype", ")", "{", "if", "(", "typeId", ">=", "reloadableTypes", ".", "length", ")", "{", "resizeReloadableTypeArray", "(", "typeId", ")", ";", "}", "reloadableTypes", "[", ...
Sometimes we discover the reloadabletype during program execution, for example A calls B and we haven't yet seen B. We find B has been loaded by a parent classloader, let's remember B here so we can do fast lookups for it. @param typeId the id for the type @param rtype the ReloadableType to associate with the id
[ "Sometimes", "we", "discover", "the", "reloadabletype", "during", "program", "execution", "for", "example", "A", "calls", "B", "and", "we", "haven", "t", "yet", "seen", "B", ".", "We", "find", "B", "has", "been", "loaded", "by", "a", "parent", "classloader...
59b32f957a05c6d9f149148158053605e2a6205a
https://github.com/spring-projects/spring-loaded/blob/59b32f957a05c6d9f149148158053605e2a6205a/springloaded/src/main/java/org/springsource/loaded/TypeRegistry.java#L1195-L1203
26,405
spring-projects/spring-loaded
springloaded/src/main/java/org/springsource/loaded/TypeRegistry.java
TypeRegistry.getReloadableType
public ReloadableType getReloadableType(String slashedClassName) { int id = getTypeIdFor(slashedClassName, true); if (id >= reloadableTypesSize) { return null; } return getReloadableType(id); }
java
public ReloadableType getReloadableType(String slashedClassName) { int id = getTypeIdFor(slashedClassName, true); if (id >= reloadableTypesSize) { return null; } return getReloadableType(id); }
[ "public", "ReloadableType", "getReloadableType", "(", "String", "slashedClassName", ")", "{", "int", "id", "=", "getTypeIdFor", "(", "slashedClassName", ",", "true", ")", ";", "if", "(", "id", ">=", "reloadableTypesSize", ")", "{", "return", "null", ";", "}", ...
Determine the reloadabletype object representation for a specified class. If the caller already knows the ID for the type, that would be a quicker way to locate the reloadable type object. @param slashedClassName the slashed (e.g. java/lang/String) class name @return the ReloadableType
[ "Determine", "the", "reloadabletype", "object", "representation", "for", "a", "specified", "class", ".", "If", "the", "caller", "already", "knows", "the", "ID", "for", "the", "type", "that", "would", "be", "a", "quicker", "way", "to", "locate", "the", "reloa...
59b32f957a05c6d9f149148158053605e2a6205a
https://github.com/spring-projects/spring-loaded/blob/59b32f957a05c6d9f149148158053605e2a6205a/springloaded/src/main/java/org/springsource/loaded/TypeRegistry.java#L1212-L1218
26,406
spring-projects/spring-loaded
springloaded/src/main/java/org/springsource/loaded/TypeRegistry.java
TypeRegistry.getReloadableType
public ReloadableType getReloadableType(String slashedClassname, boolean allocateIdIfNotYetLoaded) { if (allocateIdIfNotYetLoaded) { return getReloadableType(getTypeIdFor(slashedClassname, allocateIdIfNotYetLoaded)); } else { for (int i = 0; i < reloadableTypesSize; i++) { ReloadableType rtype = reloada...
java
public ReloadableType getReloadableType(String slashedClassname, boolean allocateIdIfNotYetLoaded) { if (allocateIdIfNotYetLoaded) { return getReloadableType(getTypeIdFor(slashedClassname, allocateIdIfNotYetLoaded)); } else { for (int i = 0; i < reloadableTypesSize; i++) { ReloadableType rtype = reloada...
[ "public", "ReloadableType", "getReloadableType", "(", "String", "slashedClassname", ",", "boolean", "allocateIdIfNotYetLoaded", ")", "{", "if", "(", "allocateIdIfNotYetLoaded", ")", "{", "return", "getReloadableType", "(", "getTypeIdFor", "(", "slashedClassname", ",", "...
Find the ReloadableType object for a given classname. If the allocateIdIfNotYetLoaded option is set then a new id will be allocated for this classname if it hasn't previously been seen before. This method does not create new ReloadableType objects, they are expected to come into existence when defined by the classloade...
[ "Find", "the", "ReloadableType", "object", "for", "a", "given", "classname", ".", "If", "the", "allocateIdIfNotYetLoaded", "option", "is", "set", "then", "a", "new", "id", "will", "be", "allocated", "for", "this", "classname", "if", "it", "hasn", "t", "previ...
59b32f957a05c6d9f149148158053605e2a6205a
https://github.com/spring-projects/spring-loaded/blob/59b32f957a05c6d9f149148158053605e2a6205a/springloaded/src/main/java/org/springsource/loaded/TypeRegistry.java#L1269-L1282
26,407
spring-projects/spring-loaded
springloaded/src/main/java/org/springsource/loaded/TypeRegistry.java
TypeRegistry.istcheck
@UsedByGeneratedCode public static Object istcheck(int ids, String nameAndDescriptor) { if (TypeRegistry.nothingReloaded) { return null; } int registryId = ids >>> 16; int typeId = ids & 0xffff; TypeRegistry typeRegistry = registryInstances[registryId].get(); ReloadableType reloadableType = typeRegistry...
java
@UsedByGeneratedCode public static Object istcheck(int ids, String nameAndDescriptor) { if (TypeRegistry.nothingReloaded) { return null; } int registryId = ids >>> 16; int typeId = ids & 0xffff; TypeRegistry typeRegistry = registryInstances[registryId].get(); ReloadableType reloadableType = typeRegistry...
[ "@", "UsedByGeneratedCode", "public", "static", "Object", "istcheck", "(", "int", "ids", ",", "String", "nameAndDescriptor", ")", "{", "if", "(", "TypeRegistry", ".", "nothingReloaded", ")", "{", "return", "null", ";", "}", "int", "registryId", "=", "ids", "...
Determine if something has changed in a particular type related to a particular descriptor and so the dispatcher interface should be used. The type registry ID and class ID are merged in the 'ids' parameter. This method is for INVOKESTATIC rewrites and so performs additional checks because it assumes the target is stat...
[ "Determine", "if", "something", "has", "changed", "in", "a", "particular", "type", "related", "to", "a", "particular", "descriptor", "and", "so", "the", "dispatcher", "interface", "should", "be", "used", ".", "The", "type", "registry", "ID", "and", "class", ...
59b32f957a05c6d9f149148158053605e2a6205a
https://github.com/spring-projects/spring-loaded/blob/59b32f957a05c6d9f149148158053605e2a6205a/springloaded/src/main/java/org/springsource/loaded/TypeRegistry.java#L1367-L1467
26,408
spring-projects/spring-loaded
springloaded/src/main/java/org/springsource/loaded/TypeRegistry.java
TypeRegistry.instanceFieldInterceptionRequired
@UsedByGeneratedCode public static boolean instanceFieldInterceptionRequired(int ids, String name) { if (nothingReloaded) { return false; } int registryId = ids >>> 16; int typeId = ids & 0xffff; TypeRegistry typeRegistry = registryInstances[registryId].get(); ReloadableType reloadableType = typeRegistr...
java
@UsedByGeneratedCode public static boolean instanceFieldInterceptionRequired(int ids, String name) { if (nothingReloaded) { return false; } int registryId = ids >>> 16; int typeId = ids & 0xffff; TypeRegistry typeRegistry = registryInstances[registryId].get(); ReloadableType reloadableType = typeRegistr...
[ "@", "UsedByGeneratedCode", "public", "static", "boolean", "instanceFieldInterceptionRequired", "(", "int", "ids", ",", "String", "name", ")", "{", "if", "(", "nothingReloaded", ")", "{", "return", "false", ";", "}", "int", "registryId", "=", "ids", ">>>", "16...
Called for a field operation - trying to determine whether a particular field needs special handling. @param ids packed representation of the registryId (top 16bits) and typeId (bottom 16bits) @param name the name of the instance field about to be accessed @return true if the field operation must be intercepted
[ "Called", "for", "a", "field", "operation", "-", "trying", "to", "determine", "whether", "a", "particular", "field", "needs", "special", "handling", "." ]
59b32f957a05c6d9f149148158053605e2a6205a
https://github.com/spring-projects/spring-loaded/blob/59b32f957a05c6d9f149148158053605e2a6205a/springloaded/src/main/java/org/springsource/loaded/TypeRegistry.java#L1747-L1763
26,409
spring-projects/spring-loaded
springloaded/src/main/java/org/springsource/loaded/TypeRegistry.java
TypeRegistry.ivicheck
@UsedByGeneratedCode public static boolean ivicheck(int ids, String nameAndDescriptor) { // Check 1: FAST: Has anything at all been reloaded? if (nothingReloaded) { return false; } // if (GlobalConfiguration.isRuntimeLogging && log.isLoggable(Level.FINER)) { // log.entering("TypeRegistry", "ivicheck", ...
java
@UsedByGeneratedCode public static boolean ivicheck(int ids, String nameAndDescriptor) { // Check 1: FAST: Has anything at all been reloaded? if (nothingReloaded) { return false; } // if (GlobalConfiguration.isRuntimeLogging && log.isLoggable(Level.FINER)) { // log.entering("TypeRegistry", "ivicheck", ...
[ "@", "UsedByGeneratedCode", "public", "static", "boolean", "ivicheck", "(", "int", "ids", ",", "String", "nameAndDescriptor", ")", "{", "// Check 1: FAST: Has anything at all been reloaded?", "if", "(", "nothingReloaded", ")", "{", "return", "false", ";", "}", "//\t\t...
Used in code the generated code replaces invokevirtual calls. Determine if the code can run as it was originally compiled. This method will return FALSE if nothing has changed to interfere with the invocation and it should proceed. This method will return TRUE if something has changed and the caller needs to do someth...
[ "Used", "in", "code", "the", "generated", "code", "replaces", "invokevirtual", "calls", ".", "Determine", "if", "the", "code", "can", "run", "as", "it", "was", "originally", "compiled", "." ]
59b32f957a05c6d9f149148158053605e2a6205a
https://github.com/spring-projects/spring-loaded/blob/59b32f957a05c6d9f149148158053605e2a6205a/springloaded/src/main/java/org/springsource/loaded/TypeRegistry.java#L1815-L1893
26,410
spring-projects/spring-loaded
springloaded/src/main/java/org/springsource/loaded/TypeRegistry.java
TypeRegistry.getReloadableType
@UsedByGeneratedCode public static ReloadableType getReloadableType(int typeRegistryId, int typeId) { if (GlobalConfiguration.verboseMode && log.isLoggable(Level.INFO)) { log.info( ">TypeRegistry.getReloadableType(typeRegistryId=" + typeRegistryId + ",typeId=" + typeId + ")"); } TypeRegistry typeRegistry...
java
@UsedByGeneratedCode public static ReloadableType getReloadableType(int typeRegistryId, int typeId) { if (GlobalConfiguration.verboseMode && log.isLoggable(Level.INFO)) { log.info( ">TypeRegistry.getReloadableType(typeRegistryId=" + typeRegistryId + ",typeId=" + typeId + ")"); } TypeRegistry typeRegistry...
[ "@", "UsedByGeneratedCode", "public", "static", "ReloadableType", "getReloadableType", "(", "int", "typeRegistryId", ",", "int", "typeId", ")", "{", "if", "(", "GlobalConfiguration", ".", "verboseMode", "&&", "log", ".", "isLoggable", "(", "Level", ".", "INFO", ...
This method discovers the reloadable type instance for the registry and type id specified. @param typeRegistryId the type registry id @param typeId the type id @return the ReloadableType (if there is no ReloadableType an exception will be thrown)
[ "This", "method", "discovers", "the", "reloadable", "type", "instance", "for", "the", "registry", "and", "type", "id", "specified", "." ]
59b32f957a05c6d9f149148158053605e2a6205a
https://github.com/spring-projects/spring-loaded/blob/59b32f957a05c6d9f149148158053605e2a6205a/springloaded/src/main/java/org/springsource/loaded/TypeRegistry.java#L1906-L1929
26,411
spring-projects/spring-loaded
springloaded/src/main/java/org/springsource/loaded/TypeRegistry.java
TypeRegistry.getPatternsFrom
private List<TypePattern> getPatternsFrom(String value) { if (value == null) { return Collections.emptyList(); } List<TypePattern> typePatterns = new ArrayList<TypePattern>(); StringTokenizer st = new StringTokenizer(value, ","); while (st.hasMoreElements()) { String typepattern = st.nextToken(); Typ...
java
private List<TypePattern> getPatternsFrom(String value) { if (value == null) { return Collections.emptyList(); } List<TypePattern> typePatterns = new ArrayList<TypePattern>(); StringTokenizer st = new StringTokenizer(value, ","); while (st.hasMoreElements()) { String typepattern = st.nextToken(); Typ...
[ "private", "List", "<", "TypePattern", ">", "getPatternsFrom", "(", "String", "value", ")", "{", "if", "(", "value", "==", "null", ")", "{", "return", "Collections", ".", "emptyList", "(", ")", ";", "}", "List", "<", "TypePattern", ">", "typePatterns", "...
Process some type pattern objects from the supplied value. For example the value might be 'com.foo.Bar,!com.foo.Goo' @param value string defining a comma separated list of type patterns @return list of TypePatterns
[ "Process", "some", "type", "pattern", "objects", "from", "the", "supplied", "value", ".", "For", "example", "the", "value", "might", "be", "com", ".", "foo", ".", "Bar", "!com", ".", "foo", ".", "Goo" ]
59b32f957a05c6d9f149148158053605e2a6205a
https://github.com/spring-projects/spring-loaded/blob/59b32f957a05c6d9f149148158053605e2a6205a/springloaded/src/main/java/org/springsource/loaded/TypeRegistry.java#L2070-L2094
26,412
spring-projects/spring-loaded
springloaded/src/main/java/org/springsource/loaded/TypeRegistry.java
TypeRegistry.recordBootstrapMethod
public synchronized int recordBootstrapMethod(String slashedClassName, Handle bsm, Object[] bsmArgs) { if (bsmmap == null) { bsmmap = new HashMap<String, BsmInfo[]>(); } BsmInfo[] bsminfo = bsmmap.get(slashedClassName); if (bsminfo == null) { bsminfo = new BsmInfo[1]; // TODO do we need BsmInfo or can ...
java
public synchronized int recordBootstrapMethod(String slashedClassName, Handle bsm, Object[] bsmArgs) { if (bsmmap == null) { bsmmap = new HashMap<String, BsmInfo[]>(); } BsmInfo[] bsminfo = bsmmap.get(slashedClassName); if (bsminfo == null) { bsminfo = new BsmInfo[1]; // TODO do we need BsmInfo or can ...
[ "public", "synchronized", "int", "recordBootstrapMethod", "(", "String", "slashedClassName", ",", "Handle", "bsm", ",", "Object", "[", "]", "bsmArgs", ")", "{", "if", "(", "bsmmap", "==", "null", ")", "{", "bsmmap", "=", "new", "HashMap", "<", "String", ",...
When an invokedynamic instruction is reached, we allocate an id that recognizes that bsm and the parameters to that bsm. The index can be used when rewriting that invokedynamic @param slashedClassName the slashed class name containing the bootstrap method @param bsm the bootstrap methods @param bsmArgs the bootstrap m...
[ "When", "an", "invokedynamic", "instruction", "is", "reached", "we", "allocate", "an", "id", "that", "recognizes", "that", "bsm", "and", "the", "parameters", "to", "that", "bsm", ".", "The", "index", "can", "be", "used", "when", "rewriting", "that", "invoked...
59b32f957a05c6d9f149148158053605e2a6205a
https://github.com/spring-projects/spring-loaded/blob/59b32f957a05c6d9f149148158053605e2a6205a/springloaded/src/main/java/org/springsource/loaded/TypeRegistry.java#L2257-L2279
26,413
spring-projects/spring-loaded
springloaded/src/main/java/org/springsource/loaded/TypeRegistry.java
TypeRegistry.associateReloadableType
@UsedByGeneratedCode public static void associateReloadableType(ReloadableType child, Class<?> parent) { // TODO performance - can we make this cheaper? ClassLoader parentClassLoader = parent.getClassLoader(); if (parentClassLoader == null) { return; } TypeRegistry parentTypeRegistry = TypeRegistry.getTyp...
java
@UsedByGeneratedCode public static void associateReloadableType(ReloadableType child, Class<?> parent) { // TODO performance - can we make this cheaper? ClassLoader parentClassLoader = parent.getClassLoader(); if (parentClassLoader == null) { return; } TypeRegistry parentTypeRegistry = TypeRegistry.getTyp...
[ "@", "UsedByGeneratedCode", "public", "static", "void", "associateReloadableType", "(", "ReloadableType", "child", ",", "Class", "<", "?", ">", "parent", ")", "{", "// TODO performance - can we make this cheaper?", "ClassLoader", "parentClassLoader", "=", "parent", ".", ...
Called from the static initializer of a reloadabletype, allowing it to connect itself to the parent type, such that when reloading occurs we can mark all relevant types in the hierarchy as being impacted by the reload. @param child the ReloadableType actively being initialized @param parent the superclass of the reloa...
[ "Called", "from", "the", "static", "initializer", "of", "a", "reloadabletype", "allowing", "it", "to", "connect", "itself", "to", "the", "parent", "type", "such", "that", "when", "reloading", "occurs", "we", "can", "mark", "all", "relevant", "types", "in", "...
59b32f957a05c6d9f149148158053605e2a6205a
https://github.com/spring-projects/spring-loaded/blob/59b32f957a05c6d9f149148158053605e2a6205a/springloaded/src/main/java/org/springsource/loaded/TypeRegistry.java#L2302-L2314
26,414
spring-projects/spring-loaded
springloaded/src/main/java/org/springsource/loaded/agent/SpringPlugin.java
SpringPlugin.clearLocalVariableTableParameterNameDiscovererCache
private void clearLocalVariableTableParameterNameDiscovererCache(Class<?> clazz) { if (localVariableTableParameterNameDiscovererInstances == null) { return; } if (debug) { System.out.println("SPRING_PLUGIN: ParameterNamesCache: Clearing parameter name discoverer caches"); } if (parameterNamesCacheField ...
java
private void clearLocalVariableTableParameterNameDiscovererCache(Class<?> clazz) { if (localVariableTableParameterNameDiscovererInstances == null) { return; } if (debug) { System.out.println("SPRING_PLUGIN: ParameterNamesCache: Clearing parameter name discoverer caches"); } if (parameterNamesCacheField ...
[ "private", "void", "clearLocalVariableTableParameterNameDiscovererCache", "(", "Class", "<", "?", ">", "clazz", ")", "{", "if", "(", "localVariableTableParameterNameDiscovererInstances", "==", "null", ")", "{", "return", ";", "}", "if", "(", "debug", ")", "{", "Sy...
The Spring class LocalVariableTableParameterNameDiscoverer holds a cache of parameter names discovered for members within classes and needs clearing if the class changes. @param clazz the class being reloaded, which may exist in a parameter name discoverer cache
[ "The", "Spring", "class", "LocalVariableTableParameterNameDiscoverer", "holds", "a", "cache", "of", "parameter", "names", "discovered", "for", "members", "within", "classes", "and", "needs", "clearing", "if", "the", "class", "changes", "." ]
59b32f957a05c6d9f149148158053605e2a6205a
https://github.com/spring-projects/spring-loaded/blob/59b32f957a05c6d9f149148158053605e2a6205a/springloaded/src/main/java/org/springsource/loaded/agent/SpringPlugin.java#L189-L226
26,415
spring-projects/spring-loaded
springloaded/src/main/java/org/springsource/loaded/agent/SpringPlugin.java
SpringPlugin.clearMappingRegistry
private void clearMappingRegistry(Object o, Class<?> clazz_AbstractHandlerMethodMapping) { if (debug) { System.out.println("SPRING_PLUGIN: clearing out mapping registry..."); } Object mappingRegistryInstance = null; try { Field field_mappingRegistry = clazz_AbstractHandlerMethodMapping.getDeclaredField("m...
java
private void clearMappingRegistry(Object o, Class<?> clazz_AbstractHandlerMethodMapping) { if (debug) { System.out.println("SPRING_PLUGIN: clearing out mapping registry..."); } Object mappingRegistryInstance = null; try { Field field_mappingRegistry = clazz_AbstractHandlerMethodMapping.getDeclaredField("m...
[ "private", "void", "clearMappingRegistry", "(", "Object", "o", ",", "Class", "<", "?", ">", "clazz_AbstractHandlerMethodMapping", ")", "{", "if", "(", "debug", ")", "{", "System", ".", "out", ".", "println", "(", "\"SPRING_PLUGIN: clearing out mapping registry...\""...
the initHandlerMethods below we will get an error about already existing mappings
[ "the", "initHandlerMethods", "below", "we", "will", "get", "an", "error", "about", "already", "existing", "mappings" ]
59b32f957a05c6d9f149148158053605e2a6205a
https://github.com/spring-projects/spring-loaded/blob/59b32f957a05c6d9f149148158053605e2a6205a/springloaded/src/main/java/org/springsource/loaded/agent/SpringPlugin.java#L447-L484
26,416
spring-projects/spring-loaded
springloaded/src/main/java/org/springsource/loaded/ri/ReflectiveInterceptor.java
ReflectiveInterceptor.asSetableField
private static Field asSetableField(Field field, Object target, Class<?> valueType, Object value, boolean makeAccessibleCopy) throws IllegalAccessException { // Must do the checks exactly in the same order as JVM if we want identical error messages. // JVM doesn't do this, since it cannot happen without relo...
java
private static Field asSetableField(Field field, Object target, Class<?> valueType, Object value, boolean makeAccessibleCopy) throws IllegalAccessException { // Must do the checks exactly in the same order as JVM if we want identical error messages. // JVM doesn't do this, since it cannot happen without relo...
[ "private", "static", "Field", "asSetableField", "(", "Field", "field", ",", "Object", "target", ",", "Class", "<", "?", ">", "valueType", ",", "Object", "value", ",", "boolean", "makeAccessibleCopy", ")", "throws", "IllegalAccessException", "{", "// Must do the ch...
Performs all necessary checks that need to be done before a field set should be allowed. @throws IllegalAccessException
[ "Performs", "all", "necessary", "checks", "that", "need", "to", "be", "done", "before", "a", "field", "set", "should", "be", "allowed", "." ]
59b32f957a05c6d9f149148158053605e2a6205a
https://github.com/spring-projects/spring-loaded/blob/59b32f957a05c6d9f149148158053605e2a6205a/springloaded/src/main/java/org/springsource/loaded/ri/ReflectiveInterceptor.java#L652-L693
26,417
spring-projects/spring-loaded
springloaded/src/main/java/org/springsource/loaded/ri/ReflectiveInterceptor.java
ReflectiveInterceptor.typeCheckFieldSet
private static void typeCheckFieldSet(Field field, Object value) throws IllegalAccessException { Class<?> fieldType = field.getType(); if (value == null) { if (fieldType.isPrimitive()) { throw Exceptions.illegalSetFieldTypeException(field, null, value); } } else { if (fieldType.isPrimitive()) { ...
java
private static void typeCheckFieldSet(Field field, Object value) throws IllegalAccessException { Class<?> fieldType = field.getType(); if (value == null) { if (fieldType.isPrimitive()) { throw Exceptions.illegalSetFieldTypeException(field, null, value); } } else { if (fieldType.isPrimitive()) { ...
[ "private", "static", "void", "typeCheckFieldSet", "(", "Field", "field", ",", "Object", "value", ")", "throws", "IllegalAccessException", "{", "Class", "<", "?", ">", "fieldType", "=", "field", ".", "getType", "(", ")", ";", "if", "(", "value", "==", "null...
Perform a dynamic type check needed when setting a field value onto a field. Raises the appropriate exception when the check fails and returns normally otherwise. This method should only be called for object types. For primitive types call the three parameter variant instead. @throws IllegalAccessException
[ "Perform", "a", "dynamic", "type", "check", "needed", "when", "setting", "a", "field", "value", "onto", "a", "field", ".", "Raises", "the", "appropriate", "exception", "when", "the", "check", "fails", "and", "returns", "normally", "otherwise", ".", "This", "...
59b32f957a05c6d9f149148158053605e2a6205a
https://github.com/spring-projects/spring-loaded/blob/59b32f957a05c6d9f149148158053605e2a6205a/springloaded/src/main/java/org/springsource/loaded/ri/ReflectiveInterceptor.java#L762-L778
26,418
spring-projects/spring-loaded
springloaded/src/main/java/org/springsource/loaded/ri/ReflectiveInterceptor.java
ReflectiveInterceptor.typeCheckFieldSet
private static void typeCheckFieldSet(Field field, Class<?> valueType, Object value) throws IllegalAccessException { if (!isPrimitive(valueType)) { //Call the version of this method that considers autoboxing typeCheckFieldSet(field, value); } else { //Value type is primitive. // Note: In this case va...
java
private static void typeCheckFieldSet(Field field, Class<?> valueType, Object value) throws IllegalAccessException { if (!isPrimitive(valueType)) { //Call the version of this method that considers autoboxing typeCheckFieldSet(field, value); } else { //Value type is primitive. // Note: In this case va...
[ "private", "static", "void", "typeCheckFieldSet", "(", "Field", "field", ",", "Class", "<", "?", ">", "valueType", ",", "Object", "value", ")", "throws", "IllegalAccessException", "{", "if", "(", "!", "isPrimitive", "(", "valueType", ")", ")", "{", "//Call t...
Perform a dynamic type check needed when setting a field value onto a field. Raises the appropriate exception when the check fails and returns normally otherwise. @throws IllegalAccessException
[ "Perform", "a", "dynamic", "type", "check", "needed", "when", "setting", "a", "field", "value", "onto", "a", "field", ".", "Raises", "the", "appropriate", "exception", "when", "the", "check", "fails", "and", "returns", "normally", "otherwise", "." ]
59b32f957a05c6d9f149148158053605e2a6205a
https://github.com/spring-projects/spring-loaded/blob/59b32f957a05c6d9f149148158053605e2a6205a/springloaded/src/main/java/org/springsource/loaded/ri/ReflectiveInterceptor.java#L786-L799
26,419
spring-projects/spring-loaded
springloaded/src/main/java/org/springsource/loaded/ri/ReflectiveInterceptor.java
ReflectiveInterceptor.jlClassGetModifiers
public static int jlClassGetModifiers(Class<?> clazz) { // ReloadableType rtype = getReloadableTypeIfHasBeenReloaded(clazz); ReloadableType rtype = getRType(clazz); if (rtype == null) { return clazz.getModifiers(); } else { //Note: the "super bit" may be set in class modifiers but we should block it ou...
java
public static int jlClassGetModifiers(Class<?> clazz) { // ReloadableType rtype = getReloadableTypeIfHasBeenReloaded(clazz); ReloadableType rtype = getRType(clazz); if (rtype == null) { return clazz.getModifiers(); } else { //Note: the "super bit" may be set in class modifiers but we should block it ou...
[ "public", "static", "int", "jlClassGetModifiers", "(", "Class", "<", "?", ">", "clazz", ")", "{", "//\t\tReloadableType rtype = getReloadableTypeIfHasBeenReloaded(clazz);", "ReloadableType", "rtype", "=", "getRType", "(", "clazz", ")", ";", "if", "(", "rtype", "==", ...
Retrieve modifiers for a Java class, which might or might not be reloadable or reloaded. @param clazz the class for which to discover modifiers @return the modifiers
[ "Retrieve", "modifiers", "for", "a", "Java", "class", "which", "might", "or", "might", "not", "be", "reloadable", "or", "reloaded", "." ]
59b32f957a05c6d9f149148158053605e2a6205a
https://github.com/spring-projects/spring-loaded/blob/59b32f957a05c6d9f149148158053605e2a6205a/springloaded/src/main/java/org/springsource/loaded/ri/ReflectiveInterceptor.java#L832-L843
26,420
spring-projects/spring-loaded
springloaded/src/main/java/org/springsource/loaded/ri/ReflectiveInterceptor.java
ReflectiveInterceptor.getRType
public static ReloadableType getRType(Class<?> clazz) { // ReloadableType rtype = null; WeakReference<ReloadableType> ref = classToRType.get(clazz); ReloadableType rtype = null; if (ref != null) { rtype = ref.get(); } if (rtype == null) { if (!theOldWay) { // 'theOldWay' attempts to grab the fie...
java
public static ReloadableType getRType(Class<?> clazz) { // ReloadableType rtype = null; WeakReference<ReloadableType> ref = classToRType.get(clazz); ReloadableType rtype = null; if (ref != null) { rtype = ref.get(); } if (rtype == null) { if (!theOldWay) { // 'theOldWay' attempts to grab the fie...
[ "public", "static", "ReloadableType", "getRType", "(", "Class", "<", "?", ">", "clazz", ")", "{", "//\t\tReloadableType rtype = null;", "WeakReference", "<", "ReloadableType", ">", "ref", "=", "classToRType", ".", "get", "(", "clazz", ")", ";", "ReloadableType", ...
Access and return the ReloadableType field on a specified class. @param clazz the class for which to discover the reloadable type @return the reloadable type for the class, or null if not reloadable
[ "Access", "and", "return", "the", "ReloadableType", "field", "on", "a", "specified", "class", "." ]
59b32f957a05c6d9f149148158053605e2a6205a
https://github.com/spring-projects/spring-loaded/blob/59b32f957a05c6d9f149148158053605e2a6205a/springloaded/src/main/java/org/springsource/loaded/ri/ReflectiveInterceptor.java#L928-L998
26,421
spring-projects/spring-loaded
springloaded/src/main/java/org/springsource/loaded/ri/ReflectiveInterceptor.java
ReflectiveInterceptor.boxTypeFor
private static Class<?> boxTypeFor(Class<?> primType) { if (primType == int.class) { return Integer.class; } else if (primType == boolean.class) { return Boolean.class; } else if (primType == byte.class) { return Byte.class; } else if (primType == char.class) { return Character.class; } el...
java
private static Class<?> boxTypeFor(Class<?> primType) { if (primType == int.class) { return Integer.class; } else if (primType == boolean.class) { return Boolean.class; } else if (primType == byte.class) { return Byte.class; } else if (primType == char.class) { return Character.class; } el...
[ "private", "static", "Class", "<", "?", ">", "boxTypeFor", "(", "Class", "<", "?", ">", "primType", ")", "{", "if", "(", "primType", "==", "int", ".", "class", ")", "{", "return", "Integer", ".", "class", ";", "}", "else", "if", "(", "primType", "=...
What's the "boxed" version of a given primtive type.
[ "What", "s", "the", "boxed", "version", "of", "a", "given", "primtive", "type", "." ]
59b32f957a05c6d9f149148158053605e2a6205a
https://github.com/spring-projects/spring-loaded/blob/59b32f957a05c6d9f149148158053605e2a6205a/springloaded/src/main/java/org/springsource/loaded/ri/ReflectiveInterceptor.java#L2199-L2225
26,422
spring-projects/spring-loaded
springloaded/src/main/java/org/springsource/loaded/ReloadableType.java
ReloadableType.retransform
private byte[] retransform(byte[] bytes) { if (!determinedNeedToRetransform) { try { String s = System.getProperty("insight.enabled", "false"); if (s.equals("true")) { // Access the weavingTransformer field, of type WeavingTransformer ClassLoader cl = typeRegistry.getClassLoader(); Field f =...
java
private byte[] retransform(byte[] bytes) { if (!determinedNeedToRetransform) { try { String s = System.getProperty("insight.enabled", "false"); if (s.equals("true")) { // Access the weavingTransformer field, of type WeavingTransformer ClassLoader cl = typeRegistry.getClassLoader(); Field f =...
[ "private", "byte", "[", "]", "retransform", "(", "byte", "[", "]", "bytes", ")", "{", "if", "(", "!", "determinedNeedToRetransform", ")", "{", "try", "{", "String", "s", "=", "System", ".", "getProperty", "(", "\"insight.enabled\"", ",", "\"false\"", ")", ...
This method will attempt to apply any pre-existing transforms to the provided bytecode, if it is thought to be necessary. Currently 'necessary' is determined by finding ourselves running under tcServer and Spring Insight being turned on. @param bytes the new bytes to be possibly transformed. @return either the origina...
[ "This", "method", "will", "attempt", "to", "apply", "any", "pre", "-", "existing", "transforms", "to", "the", "provided", "bytecode", "if", "it", "is", "thought", "to", "be", "necessary", ".", "Currently", "necessary", "is", "determined", "by", "finding", "o...
59b32f957a05c6d9f149148158053605e2a6205a
https://github.com/spring-projects/spring-loaded/blob/59b32f957a05c6d9f149148158053605e2a6205a/springloaded/src/main/java/org/springsource/loaded/ReloadableType.java#L230-L276
26,423
spring-projects/spring-loaded
springloaded/src/main/java/org/springsource/loaded/ReloadableType.java
ReloadableType.resetEnumRelatedState
private void resetEnumRelatedState() { if (clazz == null) { // the reloadabletype exists but the class hasn't been loaded yet! return; } try { Field f = clazz.getClass().getDeclaredField("enumConstants"); f.setAccessible(true); f.set(clazz, null); } catch (Exception e) { e.printStackTrace();...
java
private void resetEnumRelatedState() { if (clazz == null) { // the reloadabletype exists but the class hasn't been loaded yet! return; } try { Field f = clazz.getClass().getDeclaredField("enumConstants"); f.setAccessible(true); f.set(clazz, null); } catch (Exception e) { e.printStackTrace();...
[ "private", "void", "resetEnumRelatedState", "(", ")", "{", "if", "(", "clazz", "==", "null", ")", "{", "// the reloadabletype exists but the class hasn't been loaded yet!", "return", ";", "}", "try", "{", "Field", "f", "=", "clazz", ".", "getClass", "(", ")", "....
When an enum type is reloaded, two caches need to be cleared out from the Class object for the enum type.
[ "When", "an", "enum", "type", "is", "reloaded", "two", "caches", "need", "to", "be", "cleared", "out", "from", "the", "Class", "object", "for", "the", "enum", "type", "." ]
59b32f957a05c6d9f149148158053605e2a6205a
https://github.com/spring-projects/spring-loaded/blob/59b32f957a05c6d9f149148158053605e2a6205a/springloaded/src/main/java/org/springsource/loaded/ReloadableType.java#L500-L521
26,424
spring-projects/spring-loaded
springloaded/src/main/java/org/springsource/loaded/ReloadableType.java
ReloadableType.getCurrentMethod
public MethodMember getCurrentMethod(String name, String descriptor) { if (liveVersion == null) { return getMethod(name, descriptor); } else { return liveVersion.getReloadableMethod(name, descriptor); } }
java
public MethodMember getCurrentMethod(String name, String descriptor) { if (liveVersion == null) { return getMethod(name, descriptor); } else { return liveVersion.getReloadableMethod(name, descriptor); } }
[ "public", "MethodMember", "getCurrentMethod", "(", "String", "name", ",", "String", "descriptor", ")", "{", "if", "(", "liveVersion", "==", "null", ")", "{", "return", "getMethod", "(", "name", ",", "descriptor", ")", ";", "}", "else", "{", "return", "live...
Gets the method corresponding to given name and descriptor, taking into consideration changes that have happened by reloading. @param name the member name @param descriptor the member descriptor (e.g. (Ljava/lang/String;)I) @return the MethodMember for that name and descriptor. Null if not found on a live version, or ...
[ "Gets", "the", "method", "corresponding", "to", "given", "name", "and", "descriptor", "taking", "into", "consideration", "changes", "that", "have", "happened", "by", "reloading", "." ]
59b32f957a05c6d9f149148158053605e2a6205a
https://github.com/spring-projects/spring-loaded/blob/59b32f957a05c6d9f149148158053605e2a6205a/springloaded/src/main/java/org/springsource/loaded/ReloadableType.java#L878-L885
26,425
spring-projects/spring-loaded
springloaded/src/main/java/org/springsource/loaded/ReloadableType.java
ReloadableType.changed
@UsedByGeneratedCode public int changed(int methodId) { if (liveVersion == null) { return 0; } else { int retval = 0; // First check if a new version of the type was loaded: if (liveVersion != null) { if (GlobalConfiguration.logging && log.isLoggable(Level.FINER)) { log.info("MethodId=" + me...
java
@UsedByGeneratedCode public int changed(int methodId) { if (liveVersion == null) { return 0; } else { int retval = 0; // First check if a new version of the type was loaded: if (liveVersion != null) { if (GlobalConfiguration.logging && log.isLoggable(Level.FINER)) { log.info("MethodId=" + me...
[ "@", "UsedByGeneratedCode", "public", "int", "changed", "(", "int", "methodId", ")", "{", "if", "(", "liveVersion", "==", "null", ")", "{", "return", "0", ";", "}", "else", "{", "int", "retval", "=", "0", ";", "// First check if a new version of the type was l...
Check if the specified method is different to the original form from the type as loaded. @param methodId the ID of the method currently executing @return 0 if the method cannot have changed. 1 if the method has changed. 2 if the method has been deleted in a new version.
[ "Check", "if", "the", "specified", "method", "is", "different", "to", "the", "original", "form", "from", "the", "type", "as", "loaded", "." ]
59b32f957a05c6d9f149148158053605e2a6205a
https://github.com/spring-projects/spring-loaded/blob/59b32f957a05c6d9f149148158053605e2a6205a/springloaded/src/main/java/org/springsource/loaded/ReloadableType.java#L1053-L1082
26,426
spring-projects/spring-loaded
springloaded/src/main/java/org/springsource/loaded/ReloadableType.java
ReloadableType.determineDispatcher
@UsedByGeneratedCode public __DynamicallyDispatchable determineDispatcher(Object instance, String nameAndDescriptor) { if (nameAndDescriptor.startsWith("<init>")) { // its a ctor, no dynamic lookup required if (!hasBeenReloaded()) { // TODO evaluate whether this is too naughty. it forces creation of the ...
java
@UsedByGeneratedCode public __DynamicallyDispatchable determineDispatcher(Object instance, String nameAndDescriptor) { if (nameAndDescriptor.startsWith("<init>")) { // its a ctor, no dynamic lookup required if (!hasBeenReloaded()) { // TODO evaluate whether this is too naughty. it forces creation of the ...
[ "@", "UsedByGeneratedCode", "public", "__DynamicallyDispatchable", "determineDispatcher", "(", "Object", "instance", ",", "String", "nameAndDescriptor", ")", "{", "if", "(", "nameAndDescriptor", ".", "startsWith", "(", "\"<init>\"", ")", ")", "{", "// its a ctor, no dyn...
Intended to handle dynamic dispatch. This will determine the right type to handle the specified method and return a dispatcher that can handle it. @param instance the target instance for the invocation @param nameAndDescriptor an encoded method name and descriptor, e.g. foo(Ljava/langString;)V @return a dispatcher tha...
[ "Intended", "to", "handle", "dynamic", "dispatch", ".", "This", "will", "determine", "the", "right", "type", "to", "handle", "the", "specified", "method", "and", "return", "a", "dispatcher", "that", "can", "handle", "it", "." ]
59b32f957a05c6d9f149148158053605e2a6205a
https://github.com/spring-projects/spring-loaded/blob/59b32f957a05c6d9f149148158053605e2a6205a/springloaded/src/main/java/org/springsource/loaded/ReloadableType.java#L1141-L1211
26,427
spring-projects/spring-loaded
springloaded/src/main/java/org/springsource/loaded/ReloadableType.java
ReloadableType.findInstanceField
public FieldMember findInstanceField(String name) { FieldMember found = getLatestTypeDescriptor().getField(name); if (found != null) { return found; } // Walk up the supertypes - this is looking for instance fields so no need to search interfaces String slashedSupername = getTypeDescriptor().getSupertypeNa...
java
public FieldMember findInstanceField(String name) { FieldMember found = getLatestTypeDescriptor().getField(name); if (found != null) { return found; } // Walk up the supertypes - this is looking for instance fields so no need to search interfaces String slashedSupername = getTypeDescriptor().getSupertypeNa...
[ "public", "FieldMember", "findInstanceField", "(", "String", "name", ")", "{", "FieldMember", "found", "=", "getLatestTypeDescriptor", "(", ")", ".", "getField", "(", "name", ")", ";", "if", "(", "found", "!=", "null", ")", "{", "return", "found", ";", "}"...
Find the named instance field either on this reloadable type or on a reloadable supertype - it will not go into the non-reloadable types. This method also avoids interfaces because it is looking for instance fields. This is slightly naughty but if we assume the code we are reloading is valid code, it should never be re...
[ "Find", "the", "named", "instance", "field", "either", "on", "this", "reloadable", "type", "or", "on", "a", "reloadable", "supertype", "-", "it", "will", "not", "go", "into", "the", "non", "-", "reloadable", "types", ".", "This", "method", "also", "avoids"...
59b32f957a05c6d9f149148158053605e2a6205a
https://github.com/spring-projects/spring-loaded/blob/59b32f957a05c6d9f149148158053605e2a6205a/springloaded/src/main/java/org/springsource/loaded/ReloadableType.java#L1279-L1297
26,428
spring-projects/spring-loaded
springloaded/src/main/java/org/springsource/loaded/ReloadableType.java
ReloadableType.setField
public void setField(Object instance, String fieldname, boolean isStatic, Object newValue) throws IllegalAccessException { FieldReaderWriter fieldReaderWriter = locateField(fieldname); if (isStatic && !fieldReaderWriter.isStatic()) { throw new IncompatibleClassChangeError("Expected static field " + field...
java
public void setField(Object instance, String fieldname, boolean isStatic, Object newValue) throws IllegalAccessException { FieldReaderWriter fieldReaderWriter = locateField(fieldname); if (isStatic && !fieldReaderWriter.isStatic()) { throw new IncompatibleClassChangeError("Expected static field " + field...
[ "public", "void", "setField", "(", "Object", "instance", ",", "String", "fieldname", ",", "boolean", "isStatic", ",", "Object", "newValue", ")", "throws", "IllegalAccessException", "{", "FieldReaderWriter", "fieldReaderWriter", "=", "locateField", "(", "fieldname", ...
Attempt to set the value of a field on an instance to the specified value. @param instance the object upon which to set the field (maybe null for static fields) @param fieldname the name of the field @param isStatic whether the field is static @param newValue the new value to put into the field @throws IllegalAccessEx...
[ "Attempt", "to", "set", "the", "value", "of", "a", "field", "on", "an", "instance", "to", "the", "specified", "value", "." ]
59b32f957a05c6d9f149148158053605e2a6205a
https://github.com/spring-projects/spring-loaded/blob/59b32f957a05c6d9f149148158053605e2a6205a/springloaded/src/main/java/org/springsource/loaded/ReloadableType.java#L1347-L1367
26,429
spring-projects/spring-loaded
springloaded/src/main/java/org/springsource/loaded/ReloadableType.java
ReloadableType.getSuperRtype
public ReloadableType getSuperRtype() { if (superRtype != null) { return superRtype; } if (superclazz == null) { // Not filled in yet? Why is this code different to the interface case? String name = this.getSlashedSupertypeName(); if (name == null) { return null; } else { ReloadableType ...
java
public ReloadableType getSuperRtype() { if (superRtype != null) { return superRtype; } if (superclazz == null) { // Not filled in yet? Why is this code different to the interface case? String name = this.getSlashedSupertypeName(); if (name == null) { return null; } else { ReloadableType ...
[ "public", "ReloadableType", "getSuperRtype", "(", ")", "{", "if", "(", "superRtype", "!=", "null", ")", "{", "return", "superRtype", ";", "}", "if", "(", "superclazz", "==", "null", ")", "{", "// Not filled in yet? Why is this code different to the interface case?", ...
Return the ReloadableType representing the superclass of this type. If the supertype is not reloadable, this method will return null. The ReloadableType that is returned may not be within the same type registry, if the supertype was loaded by a different classloader. @return the ReloadableType for the supertype or nul...
[ "Return", "the", "ReloadableType", "representing", "the", "superclass", "of", "this", "type", ".", "If", "the", "supertype", "is", "not", "reloadable", "this", "method", "will", "return", "null", ".", "The", "ReloadableType", "that", "is", "returned", "may", "...
59b32f957a05c6d9f149148158053605e2a6205a
https://github.com/spring-projects/spring-loaded/blob/59b32f957a05c6d9f149148158053605e2a6205a/springloaded/src/main/java/org/springsource/loaded/ReloadableType.java#L1631-L1653
26,430
spring-projects/spring-loaded
springloaded/src/main/java/org/springsource/loaded/CurrentLiveVersion.java
CurrentLiveVersion.define
public void define() { staticInitializer = null; haveLookedForStaticInitializer = false; // DEFAULT METHODS - remove the if if (!typeDescriptor.isInterface()) { try { dispatcherClass = reloadableType.typeRegistry.defineClass(dispatcherName, dispatcher, false); } catch (RuntimeException t) { // ...
java
public void define() { staticInitializer = null; haveLookedForStaticInitializer = false; // DEFAULT METHODS - remove the if if (!typeDescriptor.isInterface()) { try { dispatcherClass = reloadableType.typeRegistry.defineClass(dispatcherName, dispatcher, false); } catch (RuntimeException t) { // ...
[ "public", "void", "define", "(", ")", "{", "staticInitializer", "=", "null", ";", "haveLookedForStaticInitializer", "=", "false", ";", "// DEFAULT METHODS - remove the if", "if", "(", "!", "typeDescriptor", ".", "isInterface", "(", ")", ")", "{", "try", "{", "di...
Defines this version. Called up front but can also be called later if the ChildClassLoader in a type registry is discarded and recreated.
[ "Defines", "this", "version", ".", "Called", "up", "front", "but", "can", "also", "be", "called", "later", "if", "the", "ChildClassLoader", "in", "a", "type", "registry", "is", "discarded", "and", "recreated", "." ]
59b32f957a05c6d9f149148158053605e2a6205a
https://github.com/spring-projects/spring-loaded/blob/59b32f957a05c6d9f149148158053605e2a6205a/springloaded/src/main/java/org/springsource/loaded/CurrentLiveVersion.java#L118-L160
26,431
spring-projects/spring-loaded
springloaded/src/main/java/org/springsource/loaded/TypeDescriptor.java
TypeDescriptor.getByDescriptor
public MethodMember getByDescriptor(String name, String descriptor) { for (MethodMember existingMethod : methods) { if (existingMethod.getName().equals(name) && existingMethod.getDescriptor().equals(descriptor)) { return existingMethod; } } return null; }
java
public MethodMember getByDescriptor(String name, String descriptor) { for (MethodMember existingMethod : methods) { if (existingMethod.getName().equals(name) && existingMethod.getDescriptor().equals(descriptor)) { return existingMethod; } } return null; }
[ "public", "MethodMember", "getByDescriptor", "(", "String", "name", ",", "String", "descriptor", ")", "{", "for", "(", "MethodMember", "existingMethod", ":", "methods", ")", "{", "if", "(", "existingMethod", ".", "getName", "(", ")", ".", "equals", "(", "nam...
Check if this descriptor defines a method with the specified name and descriptor. Return the method if it is found. Modifiers, generic signature and exceptions are ignored in this search. @param name the member name @param descriptor the member descriptor (e.g. (Ljava/lang/String;)I) @return the MethodMember if there ...
[ "Check", "if", "this", "descriptor", "defines", "a", "method", "with", "the", "specified", "name", "and", "descriptor", ".", "Return", "the", "method", "if", "it", "is", "found", ".", "Modifiers", "generic", "signature", "and", "exceptions", "are", "ignored", ...
59b32f957a05c6d9f149148158053605e2a6205a
https://github.com/spring-projects/spring-loaded/blob/59b32f957a05c6d9f149148158053605e2a6205a/springloaded/src/main/java/org/springsource/loaded/TypeDescriptor.java#L182-L189
26,432
spring-projects/spring-loaded
springloaded/src/main/java/org/springsource/loaded/InterfaceExtractor.java
InterfaceExtractor.extract
public static byte[] extract(byte[] classbytes, TypeRegistry registry, TypeDescriptor typeDescriptor) { return new InterfaceExtractor(registry).extract(classbytes, typeDescriptor); }
java
public static byte[] extract(byte[] classbytes, TypeRegistry registry, TypeDescriptor typeDescriptor) { return new InterfaceExtractor(registry).extract(classbytes, typeDescriptor); }
[ "public", "static", "byte", "[", "]", "extract", "(", "byte", "[", "]", "classbytes", ",", "TypeRegistry", "registry", ",", "TypeDescriptor", "typeDescriptor", ")", "{", "return", "new", "InterfaceExtractor", "(", "registry", ")", ".", "extract", "(", "classby...
Extract the fixed interface for a class and a type descriptor with more details on the methods. @param classbytes bytes for the class which is going through interface extraction @param registry type registry related to the classloader for this class @param typeDescriptor previously extracted type descriptor for the cl...
[ "Extract", "the", "fixed", "interface", "for", "a", "class", "and", "a", "type", "descriptor", "with", "more", "details", "on", "the", "methods", "." ]
59b32f957a05c6d9f149148158053605e2a6205a
https://github.com/spring-projects/spring-loaded/blob/59b32f957a05c6d9f149148158053605e2a6205a/springloaded/src/main/java/org/springsource/loaded/InterfaceExtractor.java#L69-L71
26,433
spring-projects/spring-loaded
springloaded/src/main/java/org/springsource/loaded/DispatcherBuilder.java
DispatcherBuilder.createFor
public static byte[] createFor(ReloadableType rtype, IncrementalTypeDescriptor newVersionTypeDescriptor, String versionstamp) { ClassReader fileReader = new ClassReader(rtype.interfaceBytes); DispatcherBuilderVisitor dispatcherVisitor = new DispatcherBuilderVisitor(rtype, newVersionTypeDescriptor, versionsta...
java
public static byte[] createFor(ReloadableType rtype, IncrementalTypeDescriptor newVersionTypeDescriptor, String versionstamp) { ClassReader fileReader = new ClassReader(rtype.interfaceBytes); DispatcherBuilderVisitor dispatcherVisitor = new DispatcherBuilderVisitor(rtype, newVersionTypeDescriptor, versionsta...
[ "public", "static", "byte", "[", "]", "createFor", "(", "ReloadableType", "rtype", ",", "IncrementalTypeDescriptor", "newVersionTypeDescriptor", ",", "String", "versionstamp", ")", "{", "ClassReader", "fileReader", "=", "new", "ClassReader", "(", "rtype", ".", "inte...
Factory method that builds the dispatcher for a specified reloadabletype. @param rtype the reloadable type @param newVersionTypeDescriptor the descriptor of the new version (the executor will be generated according to this) @param versionstamp the suffix that should be appended to the generated dispatcher @return the ...
[ "Factory", "method", "that", "builds", "the", "dispatcher", "for", "a", "specified", "reloadabletype", "." ]
59b32f957a05c6d9f149148158053605e2a6205a
https://github.com/spring-projects/spring-loaded/blob/59b32f957a05c6d9f149148158053605e2a6205a/springloaded/src/main/java/org/springsource/loaded/DispatcherBuilder.java#L52-L59
26,434
spring-projects/spring-loaded
springloaded/src/main/java/org/springsource/loaded/FieldReaderWriter.java
FieldReaderWriter.setValue
public void setValue(Object instance, Object newValue, ISMgr stateManager) throws IllegalAccessException { if (typeDescriptor.isReloadable()) { if (stateManager == null) { // Look it up using reflection stateManager = findInstanceStateManager(instance); } String declaringTypeName = typeDescriptor.get...
java
public void setValue(Object instance, Object newValue, ISMgr stateManager) throws IllegalAccessException { if (typeDescriptor.isReloadable()) { if (stateManager == null) { // Look it up using reflection stateManager = findInstanceStateManager(instance); } String declaringTypeName = typeDescriptor.get...
[ "public", "void", "setValue", "(", "Object", "instance", ",", "Object", "newValue", ",", "ISMgr", "stateManager", ")", "throws", "IllegalAccessException", "{", "if", "(", "typeDescriptor", ".", "isReloadable", "(", ")", ")", "{", "if", "(", "stateManager", "==...
Set the value of an instance field on the specified instance to the specified value. If a state manager is passed in things can be done in a more optimal way, otherwise the state manager has to be discovered from the instance. @param instance the object instance upon which to set the field @param newValue the new valu...
[ "Set", "the", "value", "of", "an", "instance", "field", "on", "the", "specified", "instance", "to", "the", "specified", "value", ".", "If", "a", "state", "manager", "is", "passed", "in", "things", "can", "be", "done", "in", "a", "more", "optimal", "way",...
59b32f957a05c6d9f149148158053605e2a6205a
https://github.com/spring-projects/spring-loaded/blob/59b32f957a05c6d9f149148158053605e2a6205a/springloaded/src/main/java/org/springsource/loaded/FieldReaderWriter.java#L63-L90
26,435
spring-projects/spring-loaded
springloaded/src/main/java/org/springsource/loaded/FieldReaderWriter.java
FieldReaderWriter.getValue
public Object getValue(Object instance, ISMgr stateManager) throws IllegalAccessException, IllegalArgumentException { Object result = null; String fieldname = theField.getName(); if (typeDescriptor.isReloadable()) { if (stateManager == null) { // find it using reflection stateManager = findInstanceStat...
java
public Object getValue(Object instance, ISMgr stateManager) throws IllegalAccessException, IllegalArgumentException { Object result = null; String fieldname = theField.getName(); if (typeDescriptor.isReloadable()) { if (stateManager == null) { // find it using reflection stateManager = findInstanceStat...
[ "public", "Object", "getValue", "(", "Object", "instance", ",", "ISMgr", "stateManager", ")", "throws", "IllegalAccessException", ",", "IllegalArgumentException", "{", "Object", "result", "=", "null", ";", "String", "fieldname", "=", "theField", ".", "getName", "(...
Return the value of the field for which is reader-writer exists. To improve performance a fieldAccessor can be supplied but if it is missing the code will go and discover it. @param instance the instance for which the field should be fetched @param stateManager an optional state manager containing the map of values (w...
[ "Return", "the", "value", "of", "the", "field", "for", "which", "is", "reader", "-", "writer", "exists", ".", "To", "improve", "performance", "a", "fieldAccessor", "can", "be", "supplied", "but", "if", "it", "is", "missing", "the", "code", "will", "go", ...
59b32f957a05c6d9f149148158053605e2a6205a
https://github.com/spring-projects/spring-loaded/blob/59b32f957a05c6d9f149148158053605e2a6205a/springloaded/src/main/java/org/springsource/loaded/FieldReaderWriter.java#L136-L220
26,436
spring-projects/spring-loaded
springloaded/src/main/java/org/springsource/loaded/FieldReaderWriter.java
FieldReaderWriter.locateFieldByReflection
private Field locateFieldByReflection(Class<?> clazz, String typeWanted, boolean isInterface, String name) { if (clazz.getName().equals(typeWanted)) { Field[] fs = clazz.getDeclaredFields(); if (fs != null) { for (Field f : fs) { if (f.getName().equals(name)) { return f; } } } } /...
java
private Field locateFieldByReflection(Class<?> clazz, String typeWanted, boolean isInterface, String name) { if (clazz.getName().equals(typeWanted)) { Field[] fs = clazz.getDeclaredFields(); if (fs != null) { for (Field f : fs) { if (f.getName().equals(name)) { return f; } } } } /...
[ "private", "Field", "locateFieldByReflection", "(", "Class", "<", "?", ">", "clazz", ",", "String", "typeWanted", ",", "boolean", "isInterface", ",", "String", "name", ")", "{", "if", "(", "clazz", ".", "getName", "(", ")", ".", "equals", "(", "typeWanted"...
Discover the named field in the hierarchy using the standard rules of resolution. @param clazz the class upon which to start looking @param typeWanted where the field is! @param name the name of the field to find @return the jlrField object representing that field, or null if not found
[ "Discover", "the", "named", "field", "in", "the", "hierarchy", "using", "the", "standard", "rules", "of", "resolution", "." ]
59b32f957a05c6d9f149148158053605e2a6205a
https://github.com/spring-projects/spring-loaded/blob/59b32f957a05c6d9f149148158053605e2a6205a/springloaded/src/main/java/org/springsource/loaded/FieldReaderWriter.java#L343-L374
26,437
spring-projects/spring-loaded
springloaded/src/main/java/org/springsource/loaded/FieldReaderWriter.java
FieldReaderWriter.findInstanceStateManager
private ISMgr findInstanceStateManager(Object instance) { Class<?> clazz = typeDescriptor.getReloadableType().getClazz(); try { Field fieldAccessorField = clazz.getField(Constants.fInstanceFieldsName); if (fieldAccessorField == null) { throw new IllegalStateException("Cant find field accessor for type " +...
java
private ISMgr findInstanceStateManager(Object instance) { Class<?> clazz = typeDescriptor.getReloadableType().getClazz(); try { Field fieldAccessorField = clazz.getField(Constants.fInstanceFieldsName); if (fieldAccessorField == null) { throw new IllegalStateException("Cant find field accessor for type " +...
[ "private", "ISMgr", "findInstanceStateManager", "(", "Object", "instance", ")", "{", "Class", "<", "?", ">", "clazz", "=", "typeDescriptor", ".", "getReloadableType", "(", ")", ".", "getClazz", "(", ")", ";", "try", "{", "Field", "fieldAccessorField", "=", "...
Discover the instance state manager for the specific object instance. Will fail by exception rather than returning null. @param instance the object instance on which to look @return the discovered state manager
[ "Discover", "the", "instance", "state", "manager", "for", "the", "specific", "object", "instance", ".", "Will", "fail", "by", "exception", "rather", "than", "returning", "null", "." ]
59b32f957a05c6d9f149148158053605e2a6205a
https://github.com/spring-projects/spring-loaded/blob/59b32f957a05c6d9f149148158053605e2a6205a/springloaded/src/main/java/org/springsource/loaded/FieldReaderWriter.java#L383-L409
26,438
spring-projects/spring-loaded
springloaded/src/main/java/org/springsource/loaded/FieldReaderWriter.java
FieldReaderWriter.findStaticStateManager
private SSMgr findStaticStateManager(Class<?> clazz) { try { Field stateManagerField = clazz.getField(Constants.fStaticFieldsName); if (stateManagerField == null) { throw new IllegalStateException("Cant find field accessor for type " + typeDescriptor.getReloadableType().getName()); } SSMgr state...
java
private SSMgr findStaticStateManager(Class<?> clazz) { try { Field stateManagerField = clazz.getField(Constants.fStaticFieldsName); if (stateManagerField == null) { throw new IllegalStateException("Cant find field accessor for type " + typeDescriptor.getReloadableType().getName()); } SSMgr state...
[ "private", "SSMgr", "findStaticStateManager", "(", "Class", "<", "?", ">", "clazz", ")", "{", "try", "{", "Field", "stateManagerField", "=", "clazz", ".", "getField", "(", "Constants", ".", "fStaticFieldsName", ")", ";", "if", "(", "stateManagerField", "==", ...
Discover the static state manager on the specified class and return it. Will fail by exception rather than returning null. @param clazz the class on which to look @return the discovered state manager
[ "Discover", "the", "static", "state", "manager", "on", "the", "specified", "class", "and", "return", "it", ".", "Will", "fail", "by", "exception", "rather", "than", "returning", "null", "." ]
59b32f957a05c6d9f149148158053605e2a6205a
https://github.com/spring-projects/spring-loaded/blob/59b32f957a05c6d9f149148158053605e2a6205a/springloaded/src/main/java/org/springsource/loaded/FieldReaderWriter.java#L418-L436
26,439
spring-projects/spring-loaded
springloaded/src/main/java/org/springsource/loaded/FieldReaderWriter.java
FieldReaderWriter.findAndGetFieldValueInHierarchy
private Object findAndGetFieldValueInHierarchy(Object instance) { Class<?> clazz = instance.getClass(); String fieldname = theField.getName(); String searchName = typeDescriptor.getName().replace('/', '.'); while (clazz != null && !clazz.getName().equals(searchName)) { clazz = clazz.getSuperclass(); } if...
java
private Object findAndGetFieldValueInHierarchy(Object instance) { Class<?> clazz = instance.getClass(); String fieldname = theField.getName(); String searchName = typeDescriptor.getName().replace('/', '.'); while (clazz != null && !clazz.getName().equals(searchName)) { clazz = clazz.getSuperclass(); } if...
[ "private", "Object", "findAndGetFieldValueInHierarchy", "(", "Object", "instance", ")", "{", "Class", "<", "?", ">", "clazz", "=", "instance", ".", "getClass", "(", ")", ";", "String", "fieldname", "=", "theField", ".", "getName", "(", ")", ";", "String", ...
Walk up the instance hierarchy looking for the field, and when it is found access it and return the result. Will exit via exception if it cannot find the field or something goes wrong when accessing it. @param instance the object instance upon which the field is being accessed @return the value of the field
[ "Walk", "up", "the", "instance", "hierarchy", "looking", "for", "the", "field", "and", "when", "it", "is", "found", "access", "it", "and", "return", "the", "result", ".", "Will", "exit", "via", "exception", "if", "it", "cannot", "find", "the", "field", "...
59b32f957a05c6d9f149148158053605e2a6205a
https://github.com/spring-projects/spring-loaded/blob/59b32f957a05c6d9f149148158053605e2a6205a/springloaded/src/main/java/org/springsource/loaded/FieldReaderWriter.java#L449-L468
26,440
spring-projects/spring-loaded
springloaded/src/main/java/org/springsource/loaded/Utils.java
Utils.addCorrectReturnInstruction
public static void addCorrectReturnInstruction(MethodVisitor mv, ReturnType returnType, boolean createCast) { if (returnType.isPrimitive()) { char ch = returnType.descriptor.charAt(0); switch (ch) { case 'V': // void is treated as a special primitive mv.visitInsn(RETURN); break; case 'I': ...
java
public static void addCorrectReturnInstruction(MethodVisitor mv, ReturnType returnType, boolean createCast) { if (returnType.isPrimitive()) { char ch = returnType.descriptor.charAt(0); switch (ch) { case 'V': // void is treated as a special primitive mv.visitInsn(RETURN); break; case 'I': ...
[ "public", "static", "void", "addCorrectReturnInstruction", "(", "MethodVisitor", "mv", ",", "ReturnType", "returnType", ",", "boolean", "createCast", ")", "{", "if", "(", "returnType", ".", "isPrimitive", "(", ")", ")", "{", "char", "ch", "=", "returnType", "....
Depending on the signature of the return type, add the appropriate instructions to the method visitor. @param mv where to visit to append the instructions @param returnType return type descriptor @param createCast whether to include CHECKCAST instructions for return type values
[ "Depending", "on", "the", "signature", "of", "the", "return", "type", "add", "the", "appropriate", "instructions", "to", "the", "method", "visitor", "." ]
59b32f957a05c6d9f149148158053605e2a6205a
https://github.com/spring-projects/spring-loaded/blob/59b32f957a05c6d9f149148158053605e2a6205a/springloaded/src/main/java/org/springsource/loaded/Utils.java#L113-L153
26,441
spring-projects/spring-loaded
springloaded/src/main/java/org/springsource/loaded/Utils.java
Utils.getParameterCount
public static int getParameterCount(String methodDescriptor) { int pos = 1; // after the '(' int count = 0; char ch; while ((ch = methodDescriptor.charAt(pos)) != ')') { // Either 'L' or '[' or primitive if (ch == 'L') { // skip to ';' pos = methodDescriptor.indexOf(';', pos + 1); } else if ...
java
public static int getParameterCount(String methodDescriptor) { int pos = 1; // after the '(' int count = 0; char ch; while ((ch = methodDescriptor.charAt(pos)) != ')') { // Either 'L' or '[' or primitive if (ch == 'L') { // skip to ';' pos = methodDescriptor.indexOf(';', pos + 1); } else if ...
[ "public", "static", "int", "getParameterCount", "(", "String", "methodDescriptor", ")", "{", "int", "pos", "=", "1", ";", "// after the '('", "int", "count", "=", "0", ";", "char", "ch", ";", "while", "(", "(", "ch", "=", "methodDescriptor", ".", "charAt",...
Return the number of parameters in the descriptor. Copes with primitives and arrays and reference types. @param methodDescriptor a method descriptor of the form (Ljava/lang/String;I[[Z)I @return number of parameters in the descriptor
[ "Return", "the", "number", "of", "parameters", "in", "the", "descriptor", ".", "Copes", "with", "primitives", "and", "arrays", "and", "reference", "types", "." ]
59b32f957a05c6d9f149148158053605e2a6205a
https://github.com/spring-projects/spring-loaded/blob/59b32f957a05c6d9f149148158053605e2a6205a/springloaded/src/main/java/org/springsource/loaded/Utils.java#L161-L183
26,442
spring-projects/spring-loaded
springloaded/src/main/java/org/springsource/loaded/Utils.java
Utils.createLoadsBasedOnDescriptor
public static void createLoadsBasedOnDescriptor(MethodVisitor mv, String descriptor, int startindex) { int slot = startindex; int descriptorpos = 1; // start after the '(' char ch; while ((ch = descriptor.charAt(descriptorpos)) != ')') { switch (ch) { case '[': mv.visitVarInsn(ALOAD, slot); slo...
java
public static void createLoadsBasedOnDescriptor(MethodVisitor mv, String descriptor, int startindex) { int slot = startindex; int descriptorpos = 1; // start after the '(' char ch; while ((ch = descriptor.charAt(descriptorpos)) != ')') { switch (ch) { case '[': mv.visitVarInsn(ALOAD, slot); slo...
[ "public", "static", "void", "createLoadsBasedOnDescriptor", "(", "MethodVisitor", "mv", ",", "String", "descriptor", ",", "int", "startindex", ")", "{", "int", "slot", "=", "startindex", ";", "int", "descriptorpos", "=", "1", ";", "// start after the '('", "char",...
Create the set of LOAD instructions to load the method parameters. Take into account the size and type. @param mv the method visitor to recieve the load instructions @param descriptor the complete method descriptor (eg. "(ILjava/lang/String;)V") - params and return type are skipped @param startindex the initial index ...
[ "Create", "the", "set", "of", "LOAD", "instructions", "to", "load", "the", "method", "parameters", ".", "Take", "into", "account", "the", "size", "and", "type", "." ]
59b32f957a05c6d9f149148158053605e2a6205a
https://github.com/spring-projects/spring-loaded/blob/59b32f957a05c6d9f149148158053605e2a6205a/springloaded/src/main/java/org/springsource/loaded/Utils.java#L193-L247
26,443
spring-projects/spring-loaded
springloaded/src/main/java/org/springsource/loaded/Utils.java
Utils.toParamClasses
public static Class<?>[] toParamClasses(String methodDescriptor, ClassLoader classLoader) throws ClassNotFoundException { Type[] paramTypes = Type.getArgumentTypes(methodDescriptor); Class<?>[] paramClasses = new Class<?>[paramTypes.length]; for (int i = 0; i < paramClasses.length; i++) { paramClasses[i] = ...
java
public static Class<?>[] toParamClasses(String methodDescriptor, ClassLoader classLoader) throws ClassNotFoundException { Type[] paramTypes = Type.getArgumentTypes(methodDescriptor); Class<?>[] paramClasses = new Class<?>[paramTypes.length]; for (int i = 0; i < paramClasses.length; i++) { paramClasses[i] = ...
[ "public", "static", "Class", "<", "?", ">", "[", "]", "toParamClasses", "(", "String", "methodDescriptor", ",", "ClassLoader", "classLoader", ")", "throws", "ClassNotFoundException", "{", "Type", "[", "]", "paramTypes", "=", "Type", ".", "getArgumentTypes", "(",...
Given a method descriptor, extract the parameter descriptor and convert into corresponding Class objects. This requires a reference to a class loader to convert type names into Class objects. @param methodDescriptor a method descriptor (e.g (Ljava/lang/String;)I) @param classLoader a class loader that can be used to l...
[ "Given", "a", "method", "descriptor", "extract", "the", "parameter", "descriptor", "and", "convert", "into", "corresponding", "Class", "objects", ".", "This", "requires", "a", "reference", "to", "a", "class", "loader", "to", "convert", "type", "names", "into", ...
59b32f957a05c6d9f149148158053605e2a6205a
https://github.com/spring-projects/spring-loaded/blob/59b32f957a05c6d9f149148158053605e2a6205a/springloaded/src/main/java/org/springsource/loaded/Utils.java#L624-L632
26,444
spring-projects/spring-loaded
springloaded/src/main/java/org/springsource/loaded/Utils.java
Utils.toClass
public static Class<?> toClass(Type type, ClassLoader classLoader) throws ClassNotFoundException { switch (type.getSort()) { case Type.VOID: return void.class; case Type.BOOLEAN: return boolean.class; case Type.CHAR: return char.class; case Type.BYTE: return byte.class; case Type.SHORT:...
java
public static Class<?> toClass(Type type, ClassLoader classLoader) throws ClassNotFoundException { switch (type.getSort()) { case Type.VOID: return void.class; case Type.BOOLEAN: return boolean.class; case Type.CHAR: return char.class; case Type.BYTE: return byte.class; case Type.SHORT:...
[ "public", "static", "Class", "<", "?", ">", "toClass", "(", "Type", "type", ",", "ClassLoader", "classLoader", ")", "throws", "ClassNotFoundException", "{", "switch", "(", "type", ".", "getSort", "(", ")", ")", "{", "case", "Type", ".", "VOID", ":", "ret...
Convert an asm Type into a corresponding Class object, requires a reference to a ClassLoader to be able to convert classnames to class objects. @param type the asm Type @param classLoader a class loader that can be used to find types @return the JVM Class for the type @throws ClassNotFoundException if there is a probl...
[ "Convert", "an", "asm", "Type", "into", "a", "corresponding", "Class", "object", "requires", "a", "reference", "to", "a", "ClassLoader", "to", "be", "able", "to", "convert", "classnames", "to", "class", "objects", "." ]
59b32f957a05c6d9f149148158053605e2a6205a
https://github.com/spring-projects/spring-loaded/blob/59b32f957a05c6d9f149148158053605e2a6205a/springloaded/src/main/java/org/springsource/loaded/Utils.java#L643-L670
26,445
spring-projects/spring-loaded
springloaded/src/main/java/org/springsource/loaded/Utils.java
Utils.toPaddedNumber
public static String toPaddedNumber(int value, int width) { StringBuilder s = new StringBuilder("00000000").append(Integer.toString(value)); return s.substring(s.length() - width); }
java
public static String toPaddedNumber(int value, int width) { StringBuilder s = new StringBuilder("00000000").append(Integer.toString(value)); return s.substring(s.length() - width); }
[ "public", "static", "String", "toPaddedNumber", "(", "int", "value", ",", "int", "width", ")", "{", "StringBuilder", "s", "=", "new", "StringBuilder", "(", "\"00000000\"", ")", ".", "append", "(", "Integer", ".", "toString", "(", "value", ")", ")", ";", ...
Create the string representation of an integer and pad it to a particular width using leading zeroes. @param value the value to convert to a string @param width the width (in chars) that the resultant string should be @return the padded string
[ "Create", "the", "string", "representation", "of", "an", "integer", "and", "pad", "it", "to", "a", "particular", "width", "using", "leading", "zeroes", "." ]
59b32f957a05c6d9f149148158053605e2a6205a
https://github.com/spring-projects/spring-loaded/blob/59b32f957a05c6d9f149148158053605e2a6205a/springloaded/src/main/java/org/springsource/loaded/Utils.java#L753-L756
26,446
spring-projects/spring-loaded
springloaded/src/main/java/org/springsource/loaded/Utils.java
Utils.loadBytesFromStream
public static byte[] loadBytesFromStream(InputStream stream) { try { BufferedInputStream bis = new BufferedInputStream(stream); byte[] theData = new byte[10000000]; int dataReadSoFar = 0; byte[] buffer = new byte[1024]; int read = 0; while ((read = bis.read(buffer)) != -1) { System.arraycopy(buf...
java
public static byte[] loadBytesFromStream(InputStream stream) { try { BufferedInputStream bis = new BufferedInputStream(stream); byte[] theData = new byte[10000000]; int dataReadSoFar = 0; byte[] buffer = new byte[1024]; int read = 0; while ((read = bis.read(buffer)) != -1) { System.arraycopy(buf...
[ "public", "static", "byte", "[", "]", "loadBytesFromStream", "(", "InputStream", "stream", ")", "{", "try", "{", "BufferedInputStream", "bis", "=", "new", "BufferedInputStream", "(", "stream", ")", ";", "byte", "[", "]", "theData", "=", "new", "byte", "[", ...
Load all the byte data from an input stream. @param stream the input stream from which to read @return a byte array containing all the data from the stream
[ "Load", "all", "the", "byte", "data", "from", "an", "input", "stream", "." ]
59b32f957a05c6d9f149148158053605e2a6205a
https://github.com/spring-projects/spring-loaded/blob/59b32f957a05c6d9f149148158053605e2a6205a/springloaded/src/main/java/org/springsource/loaded/Utils.java#L841-L861
26,447
spring-projects/spring-loaded
springloaded/src/main/java/org/springsource/loaded/Utils.java
Utils.sizeOf
public static int sizeOf(String typeDescriptor) { if (typeDescriptor.length() != 1) { return 1; } char ch = typeDescriptor.charAt(0); if (ch == 'J' || ch == 'D') { return 2; } else { return 1; } }
java
public static int sizeOf(String typeDescriptor) { if (typeDescriptor.length() != 1) { return 1; } char ch = typeDescriptor.charAt(0); if (ch == 'J' || ch == 'D') { return 2; } else { return 1; } }
[ "public", "static", "int", "sizeOf", "(", "String", "typeDescriptor", ")", "{", "if", "(", "typeDescriptor", ".", "length", "(", ")", "!=", "1", ")", "{", "return", "1", ";", "}", "char", "ch", "=", "typeDescriptor", ".", "charAt", "(", "0", ")", ";"...
Return the size of a type. The size is usually 1 except for double and long which are of size 2. The descriptor passed in is the full descriptor, including any leading 'L' and trailing ';'. @param typeDescriptor the descriptor for a single type, may be primitive. For example: I, J, Z, Ljava/lang/String; @return the si...
[ "Return", "the", "size", "of", "a", "type", ".", "The", "size", "is", "usually", "1", "except", "for", "double", "and", "long", "which", "are", "of", "size", "2", ".", "The", "descriptor", "passed", "in", "is", "the", "full", "descriptor", "including", ...
59b32f957a05c6d9f149148158053605e2a6205a
https://github.com/spring-projects/spring-loaded/blob/59b32f957a05c6d9f149148158053605e2a6205a/springloaded/src/main/java/org/springsource/loaded/Utils.java#L1181-L1192
26,448
spring-projects/spring-loaded
springloaded/src/main/java/org/springsource/loaded/Utils.java
Utils.dumpClass
public static void dumpClass(String file, byte[] bytes) { File f = new File(file); try { FileOutputStream fos = new FileOutputStream(f); fos.write(bytes); fos.flush(); fos.close(); } catch (IOException ioe) { ioe.printStackTrace(); } }
java
public static void dumpClass(String file, byte[] bytes) { File f = new File(file); try { FileOutputStream fos = new FileOutputStream(f); fos.write(bytes); fos.flush(); fos.close(); } catch (IOException ioe) { ioe.printStackTrace(); } }
[ "public", "static", "void", "dumpClass", "(", "String", "file", ",", "byte", "[", "]", "bytes", ")", "{", "File", "f", "=", "new", "File", "(", "file", ")", ";", "try", "{", "FileOutputStream", "fos", "=", "new", "FileOutputStream", "(", "f", ")", ";...
Dump some bytes into the specified file. @param file full filename for where to dump the stuff (e.g. c:/temp/Foo.class) @param bytes the bytes to write to the file
[ "Dump", "some", "bytes", "into", "the", "specified", "file", "." ]
59b32f957a05c6d9f149148158053605e2a6205a
https://github.com/spring-projects/spring-loaded/blob/59b32f957a05c6d9f149148158053605e2a6205a/springloaded/src/main/java/org/springsource/loaded/Utils.java#L1200-L1211
26,449
spring-projects/spring-loaded
springloaded/src/main/java/org/springsource/loaded/Utils.java
Utils.getSize
public static int getSize(String descriptor) { int size = 0; int descriptorpos = 1; // start after the '(' char ch; while ((ch = descriptor.charAt(descriptorpos)) != ')') { switch (ch) { case '[': size++; // jump to end of array, could be [[[[I while (descriptor.charAt(++descriptorpos) == ...
java
public static int getSize(String descriptor) { int size = 0; int descriptorpos = 1; // start after the '(' char ch; while ((ch = descriptor.charAt(descriptorpos)) != ')') { switch (ch) { case '[': size++; // jump to end of array, could be [[[[I while (descriptor.charAt(++descriptorpos) == ...
[ "public", "static", "int", "getSize", "(", "String", "descriptor", ")", "{", "int", "size", "=", "0", ";", "int", "descriptorpos", "=", "1", ";", "// start after the '('", "char", "ch", ";", "while", "(", "(", "ch", "=", "descriptor", ".", "charAt", "(",...
Compute the size required for a specific method descriptor. @param descriptor a method descriptor, for example (Ljava/lang/String;ZZ)V @return number of stack/var entries necessary for that descriptor
[ "Compute", "the", "size", "required", "for", "a", "specific", "method", "descriptor", "." ]
59b32f957a05c6d9f149148158053605e2a6205a
https://github.com/spring-projects/spring-loaded/blob/59b32f957a05c6d9f149148158053605e2a6205a/springloaded/src/main/java/org/springsource/loaded/Utils.java#L1234-L1281
26,450
spring-projects/spring-loaded
springloaded/src/main/java/org/springsource/loaded/Utils.java
Utils.loadFromStream
public static byte[] loadFromStream(InputStream stream) { try { BufferedInputStream bis = new BufferedInputStream(stream); int size = 2048; byte[] theData = new byte[size]; int dataReadSoFar = 0; byte[] buffer = new byte[size / 2]; int read = 0; while ((read = bis.read(buffer)) != -1) { if ((...
java
public static byte[] loadFromStream(InputStream stream) { try { BufferedInputStream bis = new BufferedInputStream(stream); int size = 2048; byte[] theData = new byte[size]; int dataReadSoFar = 0; byte[] buffer = new byte[size / 2]; int read = 0; while ((read = bis.read(buffer)) != -1) { if ((...
[ "public", "static", "byte", "[", "]", "loadFromStream", "(", "InputStream", "stream", ")", "{", "try", "{", "BufferedInputStream", "bis", "=", "new", "BufferedInputStream", "(", "stream", ")", ";", "int", "size", "=", "2048", ";", "byte", "[", "]", "theDat...
Load the contents of an input stream. @param stream input stream that contains the bytes to load @return the byte array loaded from the input stream
[ "Load", "the", "contents", "of", "an", "input", "stream", "." ]
59b32f957a05c6d9f149148158053605e2a6205a
https://github.com/spring-projects/spring-loaded/blob/59b32f957a05c6d9f149148158053605e2a6205a/springloaded/src/main/java/org/springsource/loaded/Utils.java#L1399-L1427
26,451
spring-projects/spring-loaded
springloaded/src/main/java/org/springsource/loaded/Utils.java
Utils.arrayCopyOf
public static <T> T[] arrayCopyOf(T[] array, int newSize) { @SuppressWarnings("unchecked") T[] newArr = (T[]) Array.newInstance(array.getClass().getComponentType(), newSize); System.arraycopy(array, 0, newArr, 0, Math.min(newSize, newArr.length)); return newArr; }
java
public static <T> T[] arrayCopyOf(T[] array, int newSize) { @SuppressWarnings("unchecked") T[] newArr = (T[]) Array.newInstance(array.getClass().getComponentType(), newSize); System.arraycopy(array, 0, newArr, 0, Math.min(newSize, newArr.length)); return newArr; }
[ "public", "static", "<", "T", ">", "T", "[", "]", "arrayCopyOf", "(", "T", "[", "]", "array", ",", "int", "newSize", ")", "{", "@", "SuppressWarnings", "(", "\"unchecked\"", ")", "T", "[", "]", "newArr", "=", "(", "T", "[", "]", ")", "Array", "."...
Utility method similar to Java 1.6 Arrays.copyOf, used instead of that method to stick to Java 1.5 only API. @param <T> the type of the array entries @param array the array to copy @param newSize the size of the new array @return a new array of the specified size containing the supplied array elements at the beginning
[ "Utility", "method", "similar", "to", "Java", "1", ".", "6", "Arrays", ".", "copyOf", "used", "instead", "of", "that", "method", "to", "stick", "to", "Java", "1", ".", "5", "only", "API", "." ]
59b32f957a05c6d9f149148158053605e2a6205a
https://github.com/spring-projects/spring-loaded/blob/59b32f957a05c6d9f149148158053605e2a6205a/springloaded/src/main/java/org/springsource/loaded/Utils.java#L1499-L1504
26,452
spring-projects/spring-loaded
springloaded/src/main/java/org/springsource/loaded/Utils.java
Utils.makePublicNonFinal
public static int makePublicNonFinal(int access) { access = (access & ~(ACC_PRIVATE | ACC_PROTECTED)) | ACC_PUBLIC; access = (access & ~ACC_FINAL); return access; }
java
public static int makePublicNonFinal(int access) { access = (access & ~(ACC_PRIVATE | ACC_PROTECTED)) | ACC_PUBLIC; access = (access & ~ACC_FINAL); return access; }
[ "public", "static", "int", "makePublicNonFinal", "(", "int", "access", ")", "{", "access", "=", "(", "access", "&", "~", "(", "ACC_PRIVATE", "|", "ACC_PROTECTED", ")", ")", "|", "ACC_PUBLIC", ";", "access", "=", "(", "access", "&", "~", "ACC_FINAL", ")",...
Modify visibility to be public. @param access existing access @return modified access, adjusted to public non-final
[ "Modify", "visibility", "to", "be", "public", "." ]
59b32f957a05c6d9f149148158053605e2a6205a
https://github.com/spring-projects/spring-loaded/blob/59b32f957a05c6d9f149148158053605e2a6205a/springloaded/src/main/java/org/springsource/loaded/Utils.java#L1512-L1516
26,453
spring-projects/spring-loaded
springloaded/src/main/java/org/springsource/loaded/Utils.java
Utils.insertPopsForAllParameters
public static int insertPopsForAllParameters(MethodVisitor mv, String desc) { String descSequence = Utils.getParamSequence(desc); if (descSequence == null) { return 0; // nothing to do, there are no parameters } int count = descSequence.length(); for (int dpos = count - 1; dpos >= 0; dpos--) { char ch =...
java
public static int insertPopsForAllParameters(MethodVisitor mv, String desc) { String descSequence = Utils.getParamSequence(desc); if (descSequence == null) { return 0; // nothing to do, there are no parameters } int count = descSequence.length(); for (int dpos = count - 1; dpos >= 0; dpos--) { char ch =...
[ "public", "static", "int", "insertPopsForAllParameters", "(", "MethodVisitor", "mv", ",", "String", "desc", ")", "{", "String", "descSequence", "=", "Utils", ".", "getParamSequence", "(", "desc", ")", ";", "if", "(", "descSequence", "==", "null", ")", "{", "...
Looks at the supplied descriptor and inserts enough pops to remove all parameters. Should be used when about to avoid a method call. @param mv the method visitor to append instructions to @param desc the method descriptor for the parameter sequence (e.g. (Ljava/lang/String;IZZ)V) @return number of parameters popped
[ "Looks", "at", "the", "supplied", "descriptor", "and", "inserts", "enough", "pops", "to", "remove", "all", "parameters", ".", "Should", "be", "used", "when", "about", "to", "avoid", "a", "method", "call", "." ]
59b32f957a05c6d9f149148158053605e2a6205a
https://github.com/spring-projects/spring-loaded/blob/59b32f957a05c6d9f149148158053605e2a6205a/springloaded/src/main/java/org/springsource/loaded/Utils.java#L1760-L1787
26,454
spring-projects/spring-loaded
springloaded/src/main/java/org/springsource/loaded/Utils.java
Utils.discoverClassname
public static String discoverClassname(byte[] classbytes) { ClassReader cr = new ClassReader(classbytes); ClassnameDiscoveryVisitor v = new ClassnameDiscoveryVisitor(); cr.accept(v, 0); return v.classname; }
java
public static String discoverClassname(byte[] classbytes) { ClassReader cr = new ClassReader(classbytes); ClassnameDiscoveryVisitor v = new ClassnameDiscoveryVisitor(); cr.accept(v, 0); return v.classname; }
[ "public", "static", "String", "discoverClassname", "(", "byte", "[", "]", "classbytes", ")", "{", "ClassReader", "cr", "=", "new", "ClassReader", "(", "classbytes", ")", ";", "ClassnameDiscoveryVisitor", "v", "=", "new", "ClassnameDiscoveryVisitor", "(", ")", ";...
Discover the classname specified in the supplied bytecode and return it. @param classbytes the bytecode for the class @return the classname recovered from the bytecode
[ "Discover", "the", "classname", "specified", "in", "the", "supplied", "bytecode", "and", "return", "it", "." ]
59b32f957a05c6d9f149148158053605e2a6205a
https://github.com/spring-projects/spring-loaded/blob/59b32f957a05c6d9f149148158053605e2a6205a/springloaded/src/main/java/org/springsource/loaded/Utils.java#L1933-L1938
26,455
spring-projects/spring-loaded
springloaded/src/main/java/org/springsource/loaded/pluginhelpers/EmptyCtor.java
EmptyCtor.invoke
public static byte[] invoke(byte[] bytesIn, String... descriptors) { ClassReader cr = new ClassReader(bytesIn); EmptyCtor ca = new EmptyCtor(descriptors); cr.accept(ca, 0); byte[] newbytes = ca.getBytes(); return newbytes; }
java
public static byte[] invoke(byte[] bytesIn, String... descriptors) { ClassReader cr = new ClassReader(bytesIn); EmptyCtor ca = new EmptyCtor(descriptors); cr.accept(ca, 0); byte[] newbytes = ca.getBytes(); return newbytes; }
[ "public", "static", "byte", "[", "]", "invoke", "(", "byte", "[", "]", "bytesIn", ",", "String", "...", "descriptors", ")", "{", "ClassReader", "cr", "=", "new", "ClassReader", "(", "bytesIn", ")", ";", "EmptyCtor", "ca", "=", "new", "EmptyCtor", "(", ...
Empty the constructors with the specified descriptors. @param bytesIn input class as bytes @param descriptors descriptors of interest (e.g. "()V") @return modified class as byte array
[ "Empty", "the", "constructors", "with", "the", "specified", "descriptors", "." ]
59b32f957a05c6d9f149148158053605e2a6205a
https://github.com/spring-projects/spring-loaded/blob/59b32f957a05c6d9f149148158053605e2a6205a/springloaded/src/main/java/org/springsource/loaded/pluginhelpers/EmptyCtor.java#L47-L53
26,456
spring-projects/spring-loaded
springloaded/src/main/java/org/springsource/loaded/support/Java8.java
Java8.emulateInvokeDynamic
public static Object emulateInvokeDynamic(ReloadableType rtype, Class<?> executorClass, Handle handle, Object[] bsmArgs, Object lookup, String indyNameAndDescriptor, Object[] indyParams) { try { CallSite callsite = callLambdaMetaFactory(rtype, bsmArgs, lookup, indyNameAndDescriptor, executorClass); return ca...
java
public static Object emulateInvokeDynamic(ReloadableType rtype, Class<?> executorClass, Handle handle, Object[] bsmArgs, Object lookup, String indyNameAndDescriptor, Object[] indyParams) { try { CallSite callsite = callLambdaMetaFactory(rtype, bsmArgs, lookup, indyNameAndDescriptor, executorClass); return ca...
[ "public", "static", "Object", "emulateInvokeDynamic", "(", "ReloadableType", "rtype", ",", "Class", "<", "?", ">", "executorClass", ",", "Handle", "handle", ",", "Object", "[", "]", "bsmArgs", ",", "Object", "lookup", ",", "String", "indyNameAndDescriptor", ",",...
Programmatic emulation of INVOKEDYNAMIC so initialize the callsite via use of the bootstrap method then invoke the result. @param executorClass the executor that will contain the lambda function, null if not yet reloaded @param handle bootstrap method handle @param bsmArgs bootstrap method arguments @param lookup The ...
[ "Programmatic", "emulation", "of", "INVOKEDYNAMIC", "so", "initialize", "the", "callsite", "via", "use", "of", "the", "bootstrap", "method", "then", "invoke", "the", "result", "." ]
59b32f957a05c6d9f149148158053605e2a6205a
https://github.com/spring-projects/spring-loaded/blob/59b32f957a05c6d9f149148158053605e2a6205a/springloaded/src/main/java/org/springsource/loaded/support/Java8.java#L85-L94
26,457
spring-projects/spring-loaded
springloaded/src/main/java/org/springsource/loaded/ConstantPoolChecker2.java
ConstantPoolChecker2.main
public static void main(String[] args) throws Exception { File[] fs = new File("./bin").listFiles(); // File[] fs = new File("../testdata-groovy/bin").listFiles(); // File[] fs = new File("/Users/aclement/grailsreload/foo/target/classes").listFiles(); checkThemAll(fs); System.out.println("total=" + total /...
java
public static void main(String[] args) throws Exception { File[] fs = new File("./bin").listFiles(); // File[] fs = new File("../testdata-groovy/bin").listFiles(); // File[] fs = new File("/Users/aclement/grailsreload/foo/target/classes").listFiles(); checkThemAll(fs); System.out.println("total=" + total /...
[ "public", "static", "void", "main", "(", "String", "[", "]", "args", ")", "throws", "Exception", "{", "File", "[", "]", "fs", "=", "new", "File", "(", "\"./bin\"", ")", ".", "listFiles", "(", ")", ";", "//\t\tFile[] fs = new File(\"../testdata-groovy/bin\").li...
Test entry point just goes through all the code in the bin folder
[ "Test", "entry", "point", "just", "goes", "through", "all", "the", "code", "in", "the", "bin", "folder" ]
59b32f957a05c6d9f149148158053605e2a6205a
https://github.com/spring-projects/spring-loaded/blob/59b32f957a05c6d9f149148158053605e2a6205a/springloaded/src/main/java/org/springsource/loaded/ConstantPoolChecker2.java#L73-L80
26,458
spring-projects/spring-loaded
springloaded/src/main/java/org/springsource/loaded/ConstantPoolScanner.java
ConstantPoolScanner.accessUtf8
private String accessUtf8(int cpIndex) { Object object = cpdata[cpIndex]; if (object instanceof String) { return (String) object; } int[] ptrAndLen = (int[]) object; String value; try { value = new String(classbytes, ptrAndLen[0], ptrAndLen[1], "UTF8"); } catch (UnsupportedEncodingException e) { ...
java
private String accessUtf8(int cpIndex) { Object object = cpdata[cpIndex]; if (object instanceof String) { return (String) object; } int[] ptrAndLen = (int[]) object; String value; try { value = new String(classbytes, ptrAndLen[0], ptrAndLen[1], "UTF8"); } catch (UnsupportedEncodingException e) { ...
[ "private", "String", "accessUtf8", "(", "int", "cpIndex", ")", "{", "Object", "object", "=", "cpdata", "[", "cpIndex", "]", ";", "if", "(", "object", "instanceof", "String", ")", "{", "return", "(", "String", ")", "object", ";", "}", "int", "[", "]", ...
Return the UTF8 at the specified index in the constant pool. The data found at the constant pool for that index may not have been unpacked yet if this is the first access of the string. If not unpacked the constant pool entry is a pair of ints in an array representing the offset and length within the classbytes where t...
[ "Return", "the", "UTF8", "at", "the", "specified", "index", "in", "the", "constant", "pool", ".", "The", "data", "found", "at", "the", "constant", "pool", "for", "that", "index", "may", "not", "have", "been", "unpacked", "yet", "if", "this", "is", "the",...
59b32f957a05c6d9f149148158053605e2a6205a
https://github.com/spring-projects/spring-loaded/blob/59b32f957a05c6d9f149148158053605e2a6205a/springloaded/src/main/java/org/springsource/loaded/ConstantPoolScanner.java#L157-L173
26,459
spring-projects/spring-loaded
springloaded/src/main/java/org/springsource/loaded/TypeDiffComputer.java
TypeDiffComputer.computeAnyMethodDifferences
private static void computeAnyMethodDifferences(MethodNode oMethod, MethodNode nMethod, TypeDelta td) { MethodDelta md = new MethodDelta(oMethod.name, oMethod.desc); if (oMethod.access != nMethod.access) { md.setAccessChanged(oMethod.access, nMethod.access); } // TODO annotations InsnList oInstructions = o...
java
private static void computeAnyMethodDifferences(MethodNode oMethod, MethodNode nMethod, TypeDelta td) { MethodDelta md = new MethodDelta(oMethod.name, oMethod.desc); if (oMethod.access != nMethod.access) { md.setAccessChanged(oMethod.access, nMethod.access); } // TODO annotations InsnList oInstructions = o...
[ "private", "static", "void", "computeAnyMethodDifferences", "(", "MethodNode", "oMethod", ",", "MethodNode", "nMethod", ",", "TypeDelta", "td", ")", "{", "MethodDelta", "md", "=", "new", "MethodDelta", "(", "oMethod", ".", "name", ",", "oMethod", ".", "desc", ...
Determine if there any differences between the methods supplied. A MethodDelta object is built to record any differences and stored against the type delta. @param oMethod 'old' method @param nMethod 'new' method @param td the type delta where changes are currently being accumulated
[ "Determine", "if", "there", "any", "differences", "between", "the", "methods", "supplied", ".", "A", "MethodDelta", "object", "is", "built", "to", "record", "any", "differences", "and", "stored", "against", "the", "type", "delta", "." ]
59b32f957a05c6d9f149148158053605e2a6205a
https://github.com/spring-projects/spring-loaded/blob/59b32f957a05c6d9f149148158053605e2a6205a/springloaded/src/main/java/org/springsource/loaded/TypeDiffComputer.java#L184-L268
26,460
igniterealtime/Smack
smack-extensions/src/main/java/org/jivesoftware/smackx/filetransfer/IncomingFileTransfer.java
IncomingFileTransfer.receiveFile
public InputStream receiveFile() throws SmackException, XMPPErrorException, InterruptedException { if (inputStream != null) { throw new IllegalStateException("Transfer already negotiated!"); } try { inputStream = negotiateStream(); } catch (XMPPErrorExcep...
java
public InputStream receiveFile() throws SmackException, XMPPErrorException, InterruptedException { if (inputStream != null) { throw new IllegalStateException("Transfer already negotiated!"); } try { inputStream = negotiateStream(); } catch (XMPPErrorExcep...
[ "public", "InputStream", "receiveFile", "(", ")", "throws", "SmackException", ",", "XMPPErrorException", ",", "InterruptedException", "{", "if", "(", "inputStream", "!=", "null", ")", "{", "throw", "new", "IllegalStateException", "(", "\"Transfer already negotiated!\"",...
Negotiates the stream method to transfer the file over and then returns the negotiated stream. @return The negotiated InputStream from which to read the data. @throws SmackException @throws XMPPErrorException If there is an error in the negotiation process an exception is thrown. @throws InterruptedException
[ "Negotiates", "the", "stream", "method", "to", "transfer", "the", "file", "over", "and", "then", "returns", "the", "negotiated", "stream", "." ]
870756997faec1e1bfabfac0cd6c2395b04da873
https://github.com/igniterealtime/Smack/blob/870756997faec1e1bfabfac0cd6c2395b04da873/smack-extensions/src/main/java/org/jivesoftware/smackx/filetransfer/IncomingFileTransfer.java#L82-L96
26,461
igniterealtime/Smack
smack-extensions/src/main/java/org/jivesoftware/smackx/filetransfer/IncomingFileTransfer.java
IncomingFileTransfer.receiveFile
public void receiveFile(final File file) throws SmackException, IOException { if (file == null) { throw new IllegalArgumentException("File cannot be null"); } if (!file.exists()) { file.createNewFile(); } if (!file.canWrite()) { th...
java
public void receiveFile(final File file) throws SmackException, IOException { if (file == null) { throw new IllegalArgumentException("File cannot be null"); } if (!file.exists()) { file.createNewFile(); } if (!file.canWrite()) { th...
[ "public", "void", "receiveFile", "(", "final", "File", "file", ")", "throws", "SmackException", ",", "IOException", "{", "if", "(", "file", "==", "null", ")", "{", "throw", "new", "IllegalArgumentException", "(", "\"File cannot be null\"", ")", ";", "}", "if",...
This method negotiates the stream and then transfer's the file over the negotiated stream. The transferred file will be saved at the provided location. This method will return immediately, file transfer progress can be monitored through several methods: <UL> <LI>{@link FileTransfer#getStatus()}</LI> <LI>{@link FileTr...
[ "This", "method", "negotiates", "the", "stream", "and", "then", "transfer", "s", "the", "file", "over", "the", "negotiated", "stream", ".", "The", "transferred", "file", "will", "be", "saved", "at", "the", "provided", "location", "." ]
870756997faec1e1bfabfac0cd6c2395b04da873
https://github.com/igniterealtime/Smack/blob/870756997faec1e1bfabfac0cd6c2395b04da873/smack-extensions/src/main/java/org/jivesoftware/smackx/filetransfer/IncomingFileTransfer.java#L117-L166
26,462
igniterealtime/Smack
smack-jingle-old/src/main/java/org/jivesoftware/smackx/jingleold/mediaimpl/jmf/AudioFormatUtils.java
AudioFormatUtils.getAudioFormat
public static AudioFormat getAudioFormat(PayloadType payloadtype) { switch (payloadtype.getId()) { case 0: return new AudioFormat(AudioFormat.ULAW_RTP); case 3: return new AudioFormat(AudioFormat.GSM_RTP); case 4: return new Au...
java
public static AudioFormat getAudioFormat(PayloadType payloadtype) { switch (payloadtype.getId()) { case 0: return new AudioFormat(AudioFormat.ULAW_RTP); case 3: return new AudioFormat(AudioFormat.GSM_RTP); case 4: return new Au...
[ "public", "static", "AudioFormat", "getAudioFormat", "(", "PayloadType", "payloadtype", ")", "{", "switch", "(", "payloadtype", ".", "getId", "(", ")", ")", "{", "case", "0", ":", "return", "new", "AudioFormat", "(", "AudioFormat", ".", "ULAW_RTP", ")", ";",...
Return a JMF AudioFormat for a given Jingle Payload type. Return null if the payload is not supported by this jmf API. @param payloadtype payloadtype @return correspondent audioType
[ "Return", "a", "JMF", "AudioFormat", "for", "a", "given", "Jingle", "Payload", "type", ".", "Return", "null", "if", "the", "payload", "is", "not", "supported", "by", "this", "jmf", "API", "." ]
870756997faec1e1bfabfac0cd6c2395b04da873
https://github.com/igniterealtime/Smack/blob/870756997faec1e1bfabfac0cd6c2395b04da873/smack-jingle-old/src/main/java/org/jivesoftware/smackx/jingleold/mediaimpl/jmf/AudioFormatUtils.java#L37-L50
26,463
igniterealtime/Smack
smack-jingle-old/src/main/java/org/jivesoftware/smackx/jingleold/nat/JingleTransportManager.java
JingleTransportManager.getResolver
public TransportResolver getResolver(JingleSession session) throws XMPPException, SmackException, InterruptedException { TransportResolver resolver = createResolver(session); if (resolver == null) { resolver = new BasicResolver(); } resolver.initializeAndWait(); retu...
java
public TransportResolver getResolver(JingleSession session) throws XMPPException, SmackException, InterruptedException { TransportResolver resolver = createResolver(session); if (resolver == null) { resolver = new BasicResolver(); } resolver.initializeAndWait(); retu...
[ "public", "TransportResolver", "getResolver", "(", "JingleSession", "session", ")", "throws", "XMPPException", ",", "SmackException", ",", "InterruptedException", "{", "TransportResolver", "resolver", "=", "createResolver", "(", "session", ")", ";", "if", "(", "resolv...
Get a new Transport Resolver to be used in a Jingle Session. @return the TransportResolver to be used @throws InterruptedException
[ "Get", "a", "new", "Transport", "Resolver", "to", "be", "used", "in", "a", "Jingle", "Session", "." ]
870756997faec1e1bfabfac0cd6c2395b04da873
https://github.com/igniterealtime/Smack/blob/870756997faec1e1bfabfac0cd6c2395b04da873/smack-jingle-old/src/main/java/org/jivesoftware/smackx/jingleold/nat/JingleTransportManager.java#L57-L65
26,464
igniterealtime/Smack
smack-extensions/src/main/java/org/jivesoftware/smackx/xdata/packet/DataForm.java
DataForm.setInstructions
public void setInstructions(List<String> instructions) { synchronized (this.instructions) { this.instructions.clear(); this.instructions.addAll(instructions); } }
java
public void setInstructions(List<String> instructions) { synchronized (this.instructions) { this.instructions.clear(); this.instructions.addAll(instructions); } }
[ "public", "void", "setInstructions", "(", "List", "<", "String", ">", "instructions", ")", "{", "synchronized", "(", "this", ".", "instructions", ")", "{", "this", ".", "instructions", ".", "clear", "(", ")", ";", "this", ".", "instructions", ".", "addAll"...
Sets the list of instructions that explain how to fill out the form and what the form is about. The dataform could include multiple instructions since each instruction could not contain newlines characters. @param instructions list of instructions that explain how to fill out the form.
[ "Sets", "the", "list", "of", "instructions", "that", "explain", "how", "to", "fill", "out", "the", "form", "and", "what", "the", "form", "is", "about", ".", "The", "dataform", "could", "include", "multiple", "instructions", "since", "each", "instruction", "c...
870756997faec1e1bfabfac0cd6c2395b04da873
https://github.com/igniterealtime/Smack/blob/870756997faec1e1bfabfac0cd6c2395b04da873/smack-extensions/src/main/java/org/jivesoftware/smackx/xdata/packet/DataForm.java#L203-L208
26,465
igniterealtime/Smack
smack-extensions/src/main/java/org/jivesoftware/smackx/xdata/packet/DataForm.java
DataForm.addField
public void addField(FormField field) { String fieldVariableName = field.getVariable(); // Form field values must be unique unless they are of type 'fixed', in // which case their variable name may be 'null', and therefore could // appear multiple times within the same form. if (...
java
public void addField(FormField field) { String fieldVariableName = field.getVariable(); // Form field values must be unique unless they are of type 'fixed', in // which case their variable name may be 'null', and therefore could // appear multiple times within the same form. if (...
[ "public", "void", "addField", "(", "FormField", "field", ")", "{", "String", "fieldVariableName", "=", "field", ".", "getVariable", "(", ")", ";", "// Form field values must be unique unless they are of type 'fixed', in", "// which case their variable name may be 'null', and ther...
Adds a new field as part of the form. @param field the field to add to the form.
[ "Adds", "a", "new", "field", "as", "part", "of", "the", "form", "." ]
870756997faec1e1bfabfac0cd6c2395b04da873
https://github.com/igniterealtime/Smack/blob/870756997faec1e1bfabfac0cd6c2395b04da873/smack-extensions/src/main/java/org/jivesoftware/smackx/xdata/packet/DataForm.java#L224-L236
26,466
igniterealtime/Smack
smack-extensions/src/main/java/org/jivesoftware/smackx/xdata/packet/DataForm.java
DataForm.addFields
public boolean addFields(Collection<FormField> fieldsToAdd) { boolean fieldOverridden = false; synchronized (fields) { for (FormField field : fieldsToAdd) { FormField previousField = fields.put(field.getVariable(), field); if (previousField != null) { ...
java
public boolean addFields(Collection<FormField> fieldsToAdd) { boolean fieldOverridden = false; synchronized (fields) { for (FormField field : fieldsToAdd) { FormField previousField = fields.put(field.getVariable(), field); if (previousField != null) { ...
[ "public", "boolean", "addFields", "(", "Collection", "<", "FormField", ">", "fieldsToAdd", ")", "{", "boolean", "fieldOverridden", "=", "false", ";", "synchronized", "(", "fields", ")", "{", "for", "(", "FormField", "field", ":", "fieldsToAdd", ")", "{", "Fo...
Add the given fields to this form. @param fieldsToAdd @return true if a field was overridden. @since 4.3.0
[ "Add", "the", "given", "fields", "to", "this", "form", "." ]
870756997faec1e1bfabfac0cd6c2395b04da873
https://github.com/igniterealtime/Smack/blob/870756997faec1e1bfabfac0cd6c2395b04da873/smack-extensions/src/main/java/org/jivesoftware/smackx/xdata/packet/DataForm.java#L245-L256
26,467
igniterealtime/Smack
smack-extensions/src/main/java/org/jivesoftware/smackx/xdata/packet/DataForm.java
DataForm.getHiddenFormTypeField
public FormField getHiddenFormTypeField() { FormField field = getField(FormField.FORM_TYPE); if (field != null && field.getType() == FormField.Type.hidden) { return field; } return null; }
java
public FormField getHiddenFormTypeField() { FormField field = getField(FormField.FORM_TYPE); if (field != null && field.getType() == FormField.Type.hidden) { return field; } return null; }
[ "public", "FormField", "getHiddenFormTypeField", "(", ")", "{", "FormField", "field", "=", "getField", "(", "FormField", ".", "FORM_TYPE", ")", ";", "if", "(", "field", "!=", "null", "&&", "field", ".", "getType", "(", ")", "==", "FormField", ".", "Type", ...
Returns the hidden FORM_TYPE field or null if this data form has none. @return the hidden FORM_TYPE field or null. @since 4.1
[ "Returns", "the", "hidden", "FORM_TYPE", "field", "or", "null", "if", "this", "data", "form", "has", "none", "." ]
870756997faec1e1bfabfac0cd6c2395b04da873
https://github.com/igniterealtime/Smack/blob/870756997faec1e1bfabfac0cd6c2395b04da873/smack-extensions/src/main/java/org/jivesoftware/smackx/xdata/packet/DataForm.java#L296-L302
26,468
igniterealtime/Smack
smack-extensions/src/main/java/org/jivesoftware/smackx/xdata/Form.java
Form.setAnswer
public void setAnswer(String variable, int value) { FormField field = getField(variable); if (field == null) { throw new IllegalArgumentException("Field not found for the specified variable name."); } validateThatFieldIsText(field); setAnswer(field, value); }
java
public void setAnswer(String variable, int value) { FormField field = getField(variable); if (field == null) { throw new IllegalArgumentException("Field not found for the specified variable name."); } validateThatFieldIsText(field); setAnswer(field, value); }
[ "public", "void", "setAnswer", "(", "String", "variable", ",", "int", "value", ")", "{", "FormField", "field", "=", "getField", "(", "variable", ")", ";", "if", "(", "field", "==", "null", ")", "{", "throw", "new", "IllegalArgumentException", "(", "\"Field...
Sets a new int value to a given form's field. The field whose variable matches the requested variable will be completed with the specified value. If no field could be found for the specified variable then an exception will be raised. @param variable the variable name that was completed. @param value the int value that...
[ "Sets", "a", "new", "int", "value", "to", "a", "given", "form", "s", "field", ".", "The", "field", "whose", "variable", "matches", "the", "requested", "variable", "will", "be", "completed", "with", "the", "specified", "value", ".", "If", "no", "field", "...
870756997faec1e1bfabfac0cd6c2395b04da873
https://github.com/igniterealtime/Smack/blob/870756997faec1e1bfabfac0cd6c2395b04da873/smack-extensions/src/main/java/org/jivesoftware/smackx/xdata/Form.java#L139-L146
26,469
igniterealtime/Smack
smack-extensions/src/main/java/org/jivesoftware/smackx/xdata/Form.java
Form.setAnswer
public void setAnswer(String variable, boolean value) { FormField field = getField(variable); if (field == null) { throw new IllegalArgumentException("Field not found for the specified variable name."); } if (field.getType() != FormField.Type.bool) { throw new Ill...
java
public void setAnswer(String variable, boolean value) { FormField field = getField(variable); if (field == null) { throw new IllegalArgumentException("Field not found for the specified variable name."); } if (field.getType() != FormField.Type.bool) { throw new Ill...
[ "public", "void", "setAnswer", "(", "String", "variable", ",", "boolean", "value", ")", "{", "FormField", "field", "=", "getField", "(", "variable", ")", ";", "if", "(", "field", "==", "null", ")", "{", "throw", "new", "IllegalArgumentException", "(", "\"F...
Sets a new boolean value to a given form's field. The field whose variable matches the requested variable will be completed with the specified value. If no field could be found for the specified variable then an exception will be raised. @param variable the variable name that was completed. @param value the boolean va...
[ "Sets", "a", "new", "boolean", "value", "to", "a", "given", "form", "s", "field", ".", "The", "field", "whose", "variable", "matches", "the", "requested", "variable", "will", "be", "completed", "with", "the", "specified", "value", ".", "If", "no", "field",...
870756997faec1e1bfabfac0cd6c2395b04da873
https://github.com/igniterealtime/Smack/blob/870756997faec1e1bfabfac0cd6c2395b04da873/smack-extensions/src/main/java/org/jivesoftware/smackx/xdata/Form.java#L230-L239
26,470
igniterealtime/Smack
smack-extensions/src/main/java/org/jivesoftware/smackx/xdata/Form.java
Form.setDefaultAnswer
public void setDefaultAnswer(String variable) { if (!isSubmitType()) { throw new IllegalStateException("Cannot set an answer if the form is not of type " + "\"submit\""); } FormField field = getField(variable); if (field != null) { // Clear the old val...
java
public void setDefaultAnswer(String variable) { if (!isSubmitType()) { throw new IllegalStateException("Cannot set an answer if the form is not of type " + "\"submit\""); } FormField field = getField(variable); if (field != null) { // Clear the old val...
[ "public", "void", "setDefaultAnswer", "(", "String", "variable", ")", "{", "if", "(", "!", "isSubmitType", "(", ")", ")", "{", "throw", "new", "IllegalStateException", "(", "\"Cannot set an answer if the form is not of type \"", "+", "\"\\\"submit\\\"\"", ")", ";", ...
Sets the default value as the value of a given form's field. The field whose variable matches the requested variable will be completed with its default value. If no field could be found for the specified variable then an exception will be raised. @param variable the variable to complete with its default value. @throws...
[ "Sets", "the", "default", "value", "as", "the", "value", "of", "a", "given", "form", "s", "field", ".", "The", "field", "whose", "variable", "matches", "the", "requested", "variable", "will", "be", "completed", "with", "its", "default", "value", ".", "If",...
870756997faec1e1bfabfac0cd6c2395b04da873
https://github.com/igniterealtime/Smack/blob/870756997faec1e1bfabfac0cd6c2395b04da873/smack-extensions/src/main/java/org/jivesoftware/smackx/xdata/Form.java#L317-L334
26,471
igniterealtime/Smack
smack-extensions/src/main/java/org/jivesoftware/smackx/xdata/Form.java
Form.getInstructions
public String getInstructions() { StringBuilder sb = new StringBuilder(); // Join the list of instructions together separated by newlines for (Iterator<String> it = dataForm.getInstructions().iterator(); it.hasNext();) { sb.append(it.next()); // If this is not the last in...
java
public String getInstructions() { StringBuilder sb = new StringBuilder(); // Join the list of instructions together separated by newlines for (Iterator<String> it = dataForm.getInstructions().iterator(); it.hasNext();) { sb.append(it.next()); // If this is not the last in...
[ "public", "String", "getInstructions", "(", ")", "{", "StringBuilder", "sb", "=", "new", "StringBuilder", "(", ")", ";", "// Join the list of instructions together separated by newlines", "for", "(", "Iterator", "<", "String", ">", "it", "=", "dataForm", ".", "getIn...
Returns the instructions that explain how to fill out the form and what the form is about. @return instructions that explain how to fill out the form.
[ "Returns", "the", "instructions", "that", "explain", "how", "to", "fill", "out", "the", "form", "and", "what", "the", "form", "is", "about", "." ]
870756997faec1e1bfabfac0cd6c2395b04da873
https://github.com/igniterealtime/Smack/blob/870756997faec1e1bfabfac0cd6c2395b04da873/smack-extensions/src/main/java/org/jivesoftware/smackx/xdata/Form.java#L373-L384
26,472
igniterealtime/Smack
smack-extensions/src/main/java/org/jivesoftware/smackx/xdata/Form.java
Form.setInstructions
public void setInstructions(String instructions) { // Split the instructions into multiple instructions for each existent newline ArrayList<String> instructionsList = new ArrayList<>(); StringTokenizer st = new StringTokenizer(instructions, "\n"); while (st.hasMoreTokens()) { ...
java
public void setInstructions(String instructions) { // Split the instructions into multiple instructions for each existent newline ArrayList<String> instructionsList = new ArrayList<>(); StringTokenizer st = new StringTokenizer(instructions, "\n"); while (st.hasMoreTokens()) { ...
[ "public", "void", "setInstructions", "(", "String", "instructions", ")", "{", "// Split the instructions into multiple instructions for each existent newline", "ArrayList", "<", "String", ">", "instructionsList", "=", "new", "ArrayList", "<>", "(", ")", ";", "StringTokenize...
Sets instructions that explain how to fill out the form and what the form is about. @param instructions instructions that explain how to fill out the form.
[ "Sets", "instructions", "that", "explain", "how", "to", "fill", "out", "the", "form", "and", "what", "the", "form", "is", "about", "." ]
870756997faec1e1bfabfac0cd6c2395b04da873
https://github.com/igniterealtime/Smack/blob/870756997faec1e1bfabfac0cd6c2395b04da873/smack-extensions/src/main/java/org/jivesoftware/smackx/xdata/Form.java#L414-L424
26,473
igniterealtime/Smack
smack-experimental/src/main/java/org/jivesoftware/smackx/sid/StableUniqueStanzaIdManager.java
StableUniqueStanzaIdManager.enable
public synchronized void enable() { ServiceDiscoveryManager.getInstanceFor(connection()).addFeature(NAMESPACE); StanzaFilter filter = new AndFilter(OUTGOING_FILTER, new NotFilter(OUTGOING_FILTER)); connection().addStanzaInterceptor(ADD_ORIGIN_ID_INTERCEPTOR, filter); }
java
public synchronized void enable() { ServiceDiscoveryManager.getInstanceFor(connection()).addFeature(NAMESPACE); StanzaFilter filter = new AndFilter(OUTGOING_FILTER, new NotFilter(OUTGOING_FILTER)); connection().addStanzaInterceptor(ADD_ORIGIN_ID_INTERCEPTOR, filter); }
[ "public", "synchronized", "void", "enable", "(", ")", "{", "ServiceDiscoveryManager", ".", "getInstanceFor", "(", "connection", "(", ")", ")", ".", "addFeature", "(", "NAMESPACE", ")", ";", "StanzaFilter", "filter", "=", "new", "AndFilter", "(", "OUTGOING_FILTER...
Start appending origin-id elements to outgoing stanzas and add the feature to disco.
[ "Start", "appending", "origin", "-", "id", "elements", "to", "outgoing", "stanzas", "and", "add", "the", "feature", "to", "disco", "." ]
870756997faec1e1bfabfac0cd6c2395b04da873
https://github.com/igniterealtime/Smack/blob/870756997faec1e1bfabfac0cd6c2395b04da873/smack-experimental/src/main/java/org/jivesoftware/smackx/sid/StableUniqueStanzaIdManager.java#L93-L97
26,474
igniterealtime/Smack
smack-jingle-old/src/main/java/org/jivesoftware/smackx/jingleold/packet/JingleDescription.java
JingleDescription.addPayloadType
public void addPayloadType(final PayloadType pt) { synchronized (payloads) { if (pt == null) { LOGGER.severe("Null payload type"); } else { payloads.add(pt); } } }
java
public void addPayloadType(final PayloadType pt) { synchronized (payloads) { if (pt == null) { LOGGER.severe("Null payload type"); } else { payloads.add(pt); } } }
[ "public", "void", "addPayloadType", "(", "final", "PayloadType", "pt", ")", "{", "synchronized", "(", "payloads", ")", "{", "if", "(", "pt", "==", "null", ")", "{", "LOGGER", ".", "severe", "(", "\"Null payload type\"", ")", ";", "}", "else", "{", "paylo...
Adds a audio payload type to the packet. @param pt the audio payload type to add.
[ "Adds", "a", "audio", "payload", "type", "to", "the", "packet", "." ]
870756997faec1e1bfabfac0cd6c2395b04da873
https://github.com/igniterealtime/Smack/blob/870756997faec1e1bfabfac0cd6c2395b04da873/smack-jingle-old/src/main/java/org/jivesoftware/smackx/jingleold/packet/JingleDescription.java#L76-L84
26,475
igniterealtime/Smack
smack-legacy/src/main/java/org/jivesoftware/smackx/xroster/RemoteRosterEntry.java
RemoteRosterEntry.getGroupArrayNames
public String[] getGroupArrayNames() { synchronized (groupNames) { return Collections.unmodifiableList(groupNames).toArray(new String[groupNames.size()]); } }
java
public String[] getGroupArrayNames() { synchronized (groupNames) { return Collections.unmodifiableList(groupNames).toArray(new String[groupNames.size()]); } }
[ "public", "String", "[", "]", "getGroupArrayNames", "(", ")", "{", "synchronized", "(", "groupNames", ")", "{", "return", "Collections", ".", "unmodifiableList", "(", "groupNames", ")", ".", "toArray", "(", "new", "String", "[", "groupNames", ".", "size", "(...
Returns a String array for the group names that the roster entry belongs to. @return a String[] for the group names.
[ "Returns", "a", "String", "array", "for", "the", "group", "names", "that", "the", "roster", "entry", "belongs", "to", "." ]
870756997faec1e1bfabfac0cd6c2395b04da873
https://github.com/igniterealtime/Smack/blob/870756997faec1e1bfabfac0cd6c2395b04da873/smack-legacy/src/main/java/org/jivesoftware/smackx/xroster/RemoteRosterEntry.java#L95-L99
26,476
igniterealtime/Smack
smack-extensions/src/main/java/org/jivesoftware/smackx/chatstates/ChatStateManager.java
ChatStateManager.getInstance
public static synchronized ChatStateManager getInstance(final XMPPConnection connection) { ChatStateManager manager = INSTANCES.get(connection); if (manager == null) { manager = new ChatStateManager(connection); INSTANCES.put(connection, manager); } ...
java
public static synchronized ChatStateManager getInstance(final XMPPConnection connection) { ChatStateManager manager = INSTANCES.get(connection); if (manager == null) { manager = new ChatStateManager(connection); INSTANCES.put(connection, manager); } ...
[ "public", "static", "synchronized", "ChatStateManager", "getInstance", "(", "final", "XMPPConnection", "connection", ")", "{", "ChatStateManager", "manager", "=", "INSTANCES", ".", "get", "(", "connection", ")", ";", "if", "(", "manager", "==", "null", ")", "{",...
Returns the ChatStateManager related to the XMPPConnection and it will create one if it does not yet exist. @param connection the connection to return the ChatStateManager @return the ChatStateManager related the the connection.
[ "Returns", "the", "ChatStateManager", "related", "to", "the", "XMPPConnection", "and", "it", "will", "create", "one", "if", "it", "does", "not", "yet", "exist", "." ]
870756997faec1e1bfabfac0cd6c2395b04da873
https://github.com/igniterealtime/Smack/blob/870756997faec1e1bfabfac0cd6c2395b04da873/smack-extensions/src/main/java/org/jivesoftware/smackx/chatstates/ChatStateManager.java#L98-L105
26,477
igniterealtime/Smack
smack-extensions/src/main/java/org/jivesoftware/smackx/muc/MultiUserChatManager.java
MultiUserChatManager.getInstanceFor
public static synchronized MultiUserChatManager getInstanceFor(XMPPConnection connection) { MultiUserChatManager multiUserChatManager = INSTANCES.get(connection); if (multiUserChatManager == null) { multiUserChatManager = new MultiUserChatManager(connection); INSTANCES.put(connec...
java
public static synchronized MultiUserChatManager getInstanceFor(XMPPConnection connection) { MultiUserChatManager multiUserChatManager = INSTANCES.get(connection); if (multiUserChatManager == null) { multiUserChatManager = new MultiUserChatManager(connection); INSTANCES.put(connec...
[ "public", "static", "synchronized", "MultiUserChatManager", "getInstanceFor", "(", "XMPPConnection", "connection", ")", "{", "MultiUserChatManager", "multiUserChatManager", "=", "INSTANCES", ".", "get", "(", "connection", ")", ";", "if", "(", "multiUserChatManager", "==...
Get a instance of a multi user chat manager for the given connection. @param connection @return a multi user chat manager.
[ "Get", "a", "instance", "of", "a", "multi", "user", "chat", "manager", "for", "the", "given", "connection", "." ]
870756997faec1e1bfabfac0cd6c2395b04da873
https://github.com/igniterealtime/Smack/blob/870756997faec1e1bfabfac0cd6c2395b04da873/smack-extensions/src/main/java/org/jivesoftware/smackx/muc/MultiUserChatManager.java#L126-L133
26,478
igniterealtime/Smack
smack-extensions/src/main/java/org/jivesoftware/smackx/muc/MultiUserChatManager.java
MultiUserChatManager.isServiceEnabled
public boolean isServiceEnabled(Jid user) throws NoResponseException, XMPPErrorException, NotConnectedException, InterruptedException { return serviceDiscoveryManager.supportsFeature(user, MUCInitialPresence.NAMESPACE); }
java
public boolean isServiceEnabled(Jid user) throws NoResponseException, XMPPErrorException, NotConnectedException, InterruptedException { return serviceDiscoveryManager.supportsFeature(user, MUCInitialPresence.NAMESPACE); }
[ "public", "boolean", "isServiceEnabled", "(", "Jid", "user", ")", "throws", "NoResponseException", ",", "XMPPErrorException", ",", "NotConnectedException", ",", "InterruptedException", "{", "return", "serviceDiscoveryManager", ".", "supportsFeature", "(", "user", ",", "...
Returns true if the specified user supports the Multi-User Chat protocol. @param user the user to check. A fully qualified xmpp ID, e.g. jdoe@example.com. @return a boolean indicating whether the specified user supports the MUC protocol. @throws XMPPErrorException @throws NoResponseException @throws NotConnectedExcept...
[ "Returns", "true", "if", "the", "specified", "user", "supports", "the", "Multi", "-", "User", "Chat", "protocol", "." ]
870756997faec1e1bfabfac0cd6c2395b04da873
https://github.com/igniterealtime/Smack/blob/870756997faec1e1bfabfac0cd6c2395b04da873/smack-extensions/src/main/java/org/jivesoftware/smackx/muc/MultiUserChatManager.java#L283-L285
26,479
igniterealtime/Smack
smack-extensions/src/main/java/org/jivesoftware/smackx/muc/MultiUserChatManager.java
MultiUserChatManager.getRoomInfo
public RoomInfo getRoomInfo(EntityBareJid room) throws NoResponseException, XMPPErrorException, NotConnectedException, InterruptedException { DiscoverInfo info = serviceDiscoveryManager.discoverInfo(room); return new RoomInfo(info); }
java
public RoomInfo getRoomInfo(EntityBareJid room) throws NoResponseException, XMPPErrorException, NotConnectedException, InterruptedException { DiscoverInfo info = serviceDiscoveryManager.discoverInfo(room); return new RoomInfo(info); }
[ "public", "RoomInfo", "getRoomInfo", "(", "EntityBareJid", "room", ")", "throws", "NoResponseException", ",", "XMPPErrorException", ",", "NotConnectedException", ",", "InterruptedException", "{", "DiscoverInfo", "info", "=", "serviceDiscoveryManager", ".", "discoverInfo", ...
Returns the discovered information of a given room without actually having to join the room. The server will provide information only for rooms that are public. @param room the name of the room in the form "roomName@service" of which we want to discover its information. @return the discovered information of a given ro...
[ "Returns", "the", "discovered", "information", "of", "a", "given", "room", "without", "actually", "having", "to", "join", "the", "room", ".", "The", "server", "will", "provide", "information", "only", "for", "rooms", "that", "are", "public", "." ]
870756997faec1e1bfabfac0cd6c2395b04da873
https://github.com/igniterealtime/Smack/blob/870756997faec1e1bfabfac0cd6c2395b04da873/smack-extensions/src/main/java/org/jivesoftware/smackx/muc/MultiUserChatManager.java#L337-L340
26,480
igniterealtime/Smack
smack-extensions/src/main/java/org/jivesoftware/smackx/muc/MultiUserChatManager.java
MultiUserChatManager.getMucServiceDomains
public List<DomainBareJid> getMucServiceDomains() throws NoResponseException, XMPPErrorException, NotConnectedException, InterruptedException { return serviceDiscoveryManager.findServices(MUCInitialPresence.NAMESPACE, false, false); }
java
public List<DomainBareJid> getMucServiceDomains() throws NoResponseException, XMPPErrorException, NotConnectedException, InterruptedException { return serviceDiscoveryManager.findServices(MUCInitialPresence.NAMESPACE, false, false); }
[ "public", "List", "<", "DomainBareJid", ">", "getMucServiceDomains", "(", ")", "throws", "NoResponseException", ",", "XMPPErrorException", ",", "NotConnectedException", ",", "InterruptedException", "{", "return", "serviceDiscoveryManager", ".", "findServices", "(", "MUCIn...
Returns a collection with the XMPP addresses of the Multi-User Chat services. @return a collection with the XMPP addresses of the Multi-User Chat services. @throws XMPPErrorException @throws NoResponseException @throws NotConnectedException @throws InterruptedException
[ "Returns", "a", "collection", "with", "the", "XMPP", "addresses", "of", "the", "Multi", "-", "User", "Chat", "services", "." ]
870756997faec1e1bfabfac0cd6c2395b04da873
https://github.com/igniterealtime/Smack/blob/870756997faec1e1bfabfac0cd6c2395b04da873/smack-extensions/src/main/java/org/jivesoftware/smackx/muc/MultiUserChatManager.java#L351-L353
26,481
igniterealtime/Smack
smack-extensions/src/main/java/org/jivesoftware/smackx/muc/MultiUserChatManager.java
MultiUserChatManager.providesMucService
public boolean providesMucService(DomainBareJid domainBareJid) throws NoResponseException, XMPPErrorException, NotConnectedException, InterruptedException { return serviceDiscoveryManager.supportsFeature(domainBareJid, MUCInitialPresence.NAMESPACE); }
java
public boolean providesMucService(DomainBareJid domainBareJid) throws NoResponseException, XMPPErrorException, NotConnectedException, InterruptedException { return serviceDiscoveryManager.supportsFeature(domainBareJid, MUCInitialPresence.NAMESPACE); }
[ "public", "boolean", "providesMucService", "(", "DomainBareJid", "domainBareJid", ")", "throws", "NoResponseException", ",", "XMPPErrorException", ",", "NotConnectedException", ",", "InterruptedException", "{", "return", "serviceDiscoveryManager", ".", "supportsFeature", "(",...
Check if the provided domain bare JID provides a MUC service. @param domainBareJid the domain bare JID to check. @return <code>true</code> if the provided JID provides a MUC service, <code>false</code> otherwise. @throws NoResponseException @throws XMPPErrorException @throws NotConnectedException @throws InterruptedEx...
[ "Check", "if", "the", "provided", "domain", "bare", "JID", "provides", "a", "MUC", "service", "." ]
870756997faec1e1bfabfac0cd6c2395b04da873
https://github.com/igniterealtime/Smack/blob/870756997faec1e1bfabfac0cd6c2395b04da873/smack-extensions/src/main/java/org/jivesoftware/smackx/muc/MultiUserChatManager.java#L383-L387
26,482
igniterealtime/Smack
smack-extensions/src/main/java/org/jivesoftware/smackx/muc/MultiUserChatManager.java
MultiUserChatManager.getRoomsHostedBy
public Map<EntityBareJid, HostedRoom> getRoomsHostedBy(DomainBareJid serviceName) throws NoResponseException, XMPPErrorException, NotConnectedException, InterruptedException, NotAMucServiceException { if (!providesMucService(serviceName)) { throw new NotAMucServiceException(servi...
java
public Map<EntityBareJid, HostedRoom> getRoomsHostedBy(DomainBareJid serviceName) throws NoResponseException, XMPPErrorException, NotConnectedException, InterruptedException, NotAMucServiceException { if (!providesMucService(serviceName)) { throw new NotAMucServiceException(servi...
[ "public", "Map", "<", "EntityBareJid", ",", "HostedRoom", ">", "getRoomsHostedBy", "(", "DomainBareJid", "serviceName", ")", "throws", "NoResponseException", ",", "XMPPErrorException", ",", "NotConnectedException", ",", "InterruptedException", ",", "NotAMucServiceException"...
Returns a Map of HostedRooms where each HostedRoom has the XMPP address of the room and the room's name. Once discovered the rooms hosted by a chat service it is possible to discover more detailed room information or join the room. @param serviceName the service that is hosting the rooms to discover. @return a map fro...
[ "Returns", "a", "Map", "of", "HostedRooms", "where", "each", "HostedRoom", "has", "the", "XMPP", "address", "of", "the", "room", "and", "the", "room", "s", "name", ".", "Once", "discovered", "the", "rooms", "hosted", "by", "a", "chat", "service", "it", "...
870756997faec1e1bfabfac0cd6c2395b04da873
https://github.com/igniterealtime/Smack/blob/870756997faec1e1bfabfac0cd6c2395b04da873/smack-extensions/src/main/java/org/jivesoftware/smackx/muc/MultiUserChatManager.java#L403-L419
26,483
igniterealtime/Smack
smack-extensions/src/main/java/org/jivesoftware/smackx/muc/MultiUserChatManager.java
MultiUserChatManager.decline
public void decline(EntityBareJid room, EntityBareJid inviter, String reason) throws NotConnectedException, InterruptedException { Message message = new Message(room); // Create the MUCUser packet that will include the rejection MUCUser mucUser = new MUCUser(); MUCUser.Decline decline =...
java
public void decline(EntityBareJid room, EntityBareJid inviter, String reason) throws NotConnectedException, InterruptedException { Message message = new Message(room); // Create the MUCUser packet that will include the rejection MUCUser mucUser = new MUCUser(); MUCUser.Decline decline =...
[ "public", "void", "decline", "(", "EntityBareJid", "room", ",", "EntityBareJid", "inviter", ",", "String", "reason", ")", "throws", "NotConnectedException", ",", "InterruptedException", "{", "Message", "message", "=", "new", "Message", "(", "room", ")", ";", "//...
Informs the sender of an invitation that the invitee declines the invitation. The rejection will be sent to the room which in turn will forward the rejection to the inviter. @param room the room that sent the original invitation. @param inviter the inviter of the declined invitation. @param reason the reason why the i...
[ "Informs", "the", "sender", "of", "an", "invitation", "that", "the", "invitee", "declines", "the", "invitation", ".", "The", "rejection", "will", "be", "sent", "to", "the", "room", "which", "in", "turn", "will", "forward", "the", "rejection", "to", "the", ...
870756997faec1e1bfabfac0cd6c2395b04da873
https://github.com/igniterealtime/Smack/blob/870756997faec1e1bfabfac0cd6c2395b04da873/smack-extensions/src/main/java/org/jivesoftware/smackx/muc/MultiUserChatManager.java#L431-L442
26,484
igniterealtime/Smack
smack-core/src/main/java/org/jivesoftware/smack/sasl/SASLMechanism.java
SASLMechanism.challengeReceived
public final void challengeReceived(String challengeString, boolean finalChallenge) throws SmackSaslException, InterruptedException, NotConnectedException { byte[] challenge = Base64.decode((challengeString != null && challengeString.equals("=")) ? "" : challengeString); byte[] response = evaluateChalle...
java
public final void challengeReceived(String challengeString, boolean finalChallenge) throws SmackSaslException, InterruptedException, NotConnectedException { byte[] challenge = Base64.decode((challengeString != null && challengeString.equals("=")) ? "" : challengeString); byte[] response = evaluateChalle...
[ "public", "final", "void", "challengeReceived", "(", "String", "challengeString", ",", "boolean", "finalChallenge", ")", "throws", "SmackSaslException", ",", "InterruptedException", ",", "NotConnectedException", "{", "byte", "[", "]", "challenge", "=", "Base64", ".", ...
The server is challenging the SASL mechanism for the stanza he just sent. Send a response to the server's challenge. @param challengeString a base64 encoded string representing the challenge. @param finalChallenge true if this is the last challenge send by the server within the success stanza @throws SmackSaslExceptio...
[ "The", "server", "is", "challenging", "the", "SASL", "mechanism", "for", "the", "stanza", "he", "just", "sent", ".", "Send", "a", "response", "to", "the", "server", "s", "challenge", "." ]
870756997faec1e1bfabfac0cd6c2395b04da873
https://github.com/igniterealtime/Smack/blob/870756997faec1e1bfabfac0cd6c2395b04da873/smack-core/src/main/java/org/jivesoftware/smack/sasl/SASLMechanism.java#L227-L244
26,485
igniterealtime/Smack
smack-extensions/src/main/java/org/jivesoftware/smackx/vcardtemp/VCardManager.java
VCardManager.loadVCard
public VCard loadVCard(EntityBareJid bareJid) throws NoResponseException, XMPPErrorException, NotConnectedException, InterruptedException { VCard vcardRequest = new VCard(); vcardRequest.setTo(bareJid); VCard result = connection().createStanzaCollectorAndSend(vcardRequest).nextResultOrThrow(); ...
java
public VCard loadVCard(EntityBareJid bareJid) throws NoResponseException, XMPPErrorException, NotConnectedException, InterruptedException { VCard vcardRequest = new VCard(); vcardRequest.setTo(bareJid); VCard result = connection().createStanzaCollectorAndSend(vcardRequest).nextResultOrThrow(); ...
[ "public", "VCard", "loadVCard", "(", "EntityBareJid", "bareJid", ")", "throws", "NoResponseException", ",", "XMPPErrorException", ",", "NotConnectedException", ",", "InterruptedException", "{", "VCard", "vcardRequest", "=", "new", "VCard", "(", ")", ";", "vcardRequest...
Load VCard information for a given user. @param bareJid bareJid of the user. @return VCard. @throws XMPPErrorException @throws NoResponseException if there was no response from the server. @throws NotConnectedException @throws InterruptedException
[ "Load", "VCard", "information", "for", "a", "given", "user", "." ]
870756997faec1e1bfabfac0cd6c2395b04da873
https://github.com/igniterealtime/Smack/blob/870756997faec1e1bfabfac0cd6c2395b04da873/smack-extensions/src/main/java/org/jivesoftware/smackx/vcardtemp/VCardManager.java#L136-L141
26,486
igniterealtime/Smack
smack-core/src/main/java/org/jivesoftware/smack/debugger/ReflectionDebuggerFactory.java
ReflectionDebuggerFactory.setDebuggerClass
public static void setDebuggerClass(Class<? extends SmackDebugger> debuggerClass) { if (debuggerClass == null) { System.clearProperty(DEBUGGER_CLASS_PROPERTY_NAME); } else { System.setProperty(DEBUGGER_CLASS_PROPERTY_NAME, debuggerClass.getCanonicalName()); } }
java
public static void setDebuggerClass(Class<? extends SmackDebugger> debuggerClass) { if (debuggerClass == null) { System.clearProperty(DEBUGGER_CLASS_PROPERTY_NAME); } else { System.setProperty(DEBUGGER_CLASS_PROPERTY_NAME, debuggerClass.getCanonicalName()); } }
[ "public", "static", "void", "setDebuggerClass", "(", "Class", "<", "?", "extends", "SmackDebugger", ">", "debuggerClass", ")", "{", "if", "(", "debuggerClass", "==", "null", ")", "{", "System", ".", "clearProperty", "(", "DEBUGGER_CLASS_PROPERTY_NAME", ")", ";",...
Sets custom debugger class to be created by this factory. @param debuggerClass class to be used by this factory
[ "Sets", "custom", "debugger", "class", "to", "be", "created", "by", "this", "factory", "." ]
870756997faec1e1bfabfac0cd6c2395b04da873
https://github.com/igniterealtime/Smack/blob/870756997faec1e1bfabfac0cd6c2395b04da873/smack-core/src/main/java/org/jivesoftware/smack/debugger/ReflectionDebuggerFactory.java#L51-L57
26,487
igniterealtime/Smack
smack-core/src/main/java/org/jivesoftware/smack/debugger/ReflectionDebuggerFactory.java
ReflectionDebuggerFactory.getDebuggerClass
@SuppressWarnings("unchecked") public static Class<SmackDebugger> getDebuggerClass() { String customDebuggerClassName = getCustomDebuggerClassName(); if (customDebuggerClassName == null) { return getOneOfDefaultDebuggerClasses(); } else { try { return ...
java
@SuppressWarnings("unchecked") public static Class<SmackDebugger> getDebuggerClass() { String customDebuggerClassName = getCustomDebuggerClassName(); if (customDebuggerClassName == null) { return getOneOfDefaultDebuggerClasses(); } else { try { return ...
[ "@", "SuppressWarnings", "(", "\"unchecked\"", ")", "public", "static", "Class", "<", "SmackDebugger", ">", "getDebuggerClass", "(", ")", "{", "String", "customDebuggerClassName", "=", "getCustomDebuggerClassName", "(", ")", ";", "if", "(", "customDebuggerClassName", ...
Returns debugger class used by this factory. @return debugger class that will be used for instantiation by this factory
[ "Returns", "debugger", "class", "used", "by", "this", "factory", "." ]
870756997faec1e1bfabfac0cd6c2395b04da873
https://github.com/igniterealtime/Smack/blob/870756997faec1e1bfabfac0cd6c2395b04da873/smack-core/src/main/java/org/jivesoftware/smack/debugger/ReflectionDebuggerFactory.java#L63-L77
26,488
igniterealtime/Smack
smack-legacy/src/main/java/org/jivesoftware/smackx/workgroup/ext/notes/ChatNotes.java
ChatNotes.replace
public static final String replace(String string, String oldString, String newString) { if (string == null) { return null; } // If the newString is null or zero length, just return the string since there's nothing // to replace. if (newString == null) { re...
java
public static final String replace(String string, String oldString, String newString) { if (string == null) { return null; } // If the newString is null or zero length, just return the string since there's nothing // to replace. if (newString == null) { re...
[ "public", "static", "final", "String", "replace", "(", "String", "string", ",", "String", "oldString", ",", "String", "newString", ")", "{", "if", "(", "string", "==", "null", ")", "{", "return", "null", ";", "}", "// If the newString is null or zero length, jus...
Replaces all instances of oldString with newString in string. @param string the String to search to perform replacements on @param oldString the String that should be replaced by newString @param newString the String that will replace all instances of oldString @return a String will all instances of oldString repla...
[ "Replaces", "all", "instances", "of", "oldString", "with", "newString", "in", "string", "." ]
870756997faec1e1bfabfac0cd6c2395b04da873
https://github.com/igniterealtime/Smack/blob/870756997faec1e1bfabfac0cd6c2395b04da873/smack-legacy/src/main/java/org/jivesoftware/smackx/workgroup/ext/notes/ChatNotes.java#L123-L153
26,489
igniterealtime/Smack
smack-legacy/src/main/java/org/jivesoftware/smackx/xroster/RosterExchangeManager.java
RosterExchangeManager.send
public void send(Roster roster, Jid targetUserID) throws NotConnectedException, InterruptedException { // Create a new message to send the roster Message msg = new Message(targetUserID); // Create a RosterExchange Package and add it to the message RosterExchange rosterExchange = new Rost...
java
public void send(Roster roster, Jid targetUserID) throws NotConnectedException, InterruptedException { // Create a new message to send the roster Message msg = new Message(targetUserID); // Create a RosterExchange Package and add it to the message RosterExchange rosterExchange = new Rost...
[ "public", "void", "send", "(", "Roster", "roster", ",", "Jid", "targetUserID", ")", "throws", "NotConnectedException", ",", "InterruptedException", "{", "// Create a new message to send the roster", "Message", "msg", "=", "new", "Message", "(", "targetUserID", ")", ";...
Sends a roster to userID. All the entries of the roster will be sent to the target user. @param roster the roster to send @param targetUserID the user that will receive the roster entries @throws NotConnectedException @throws InterruptedException
[ "Sends", "a", "roster", "to", "userID", ".", "All", "the", "entries", "of", "the", "roster", "will", "be", "sent", "to", "the", "target", "user", "." ]
870756997faec1e1bfabfac0cd6c2395b04da873
https://github.com/igniterealtime/Smack/blob/870756997faec1e1bfabfac0cd6c2395b04da873/smack-legacy/src/main/java/org/jivesoftware/smackx/xroster/RosterExchangeManager.java#L123-L133
26,490
igniterealtime/Smack
smack-legacy/src/main/java/org/jivesoftware/smackx/xroster/RosterExchangeManager.java
RosterExchangeManager.send
public void send(RosterEntry rosterEntry, Jid targetUserID) throws NotConnectedException, InterruptedException { // Create a new message to send the roster Message msg = new Message(targetUserID); // Create a RosterExchange Package and add it to the message RosterExchange rosterExchange ...
java
public void send(RosterEntry rosterEntry, Jid targetUserID) throws NotConnectedException, InterruptedException { // Create a new message to send the roster Message msg = new Message(targetUserID); // Create a RosterExchange Package and add it to the message RosterExchange rosterExchange ...
[ "public", "void", "send", "(", "RosterEntry", "rosterEntry", ",", "Jid", "targetUserID", ")", "throws", "NotConnectedException", ",", "InterruptedException", "{", "// Create a new message to send the roster", "Message", "msg", "=", "new", "Message", "(", "targetUserID", ...
Sends a roster entry to userID. @param rosterEntry the roster entry to send @param targetUserID the user that will receive the roster entries @throws NotConnectedException @throws InterruptedException
[ "Sends", "a", "roster", "entry", "to", "userID", "." ]
870756997faec1e1bfabfac0cd6c2395b04da873
https://github.com/igniterealtime/Smack/blob/870756997faec1e1bfabfac0cd6c2395b04da873/smack-legacy/src/main/java/org/jivesoftware/smackx/xroster/RosterExchangeManager.java#L143-L154
26,491
igniterealtime/Smack
smack-legacy/src/main/java/org/jivesoftware/smackx/xroster/RosterExchangeManager.java
RosterExchangeManager.send
public void send(RosterGroup rosterGroup, Jid targetUserID) throws NotConnectedException, InterruptedException { // Create a new message to send the roster Message msg = new Message(targetUserID); // Create a RosterExchange Package and add it to the message RosterExchange rosterExchange ...
java
public void send(RosterGroup rosterGroup, Jid targetUserID) throws NotConnectedException, InterruptedException { // Create a new message to send the roster Message msg = new Message(targetUserID); // Create a RosterExchange Package and add it to the message RosterExchange rosterExchange ...
[ "public", "void", "send", "(", "RosterGroup", "rosterGroup", ",", "Jid", "targetUserID", ")", "throws", "NotConnectedException", ",", "InterruptedException", "{", "// Create a new message to send the roster", "Message", "msg", "=", "new", "Message", "(", "targetUserID", ...
Sends a roster group to userID. All the entries of the group will be sent to the target user. @param rosterGroup the roster group to send @param targetUserID the user that will receive the roster entries @throws NotConnectedException @throws InterruptedException
[ "Sends", "a", "roster", "group", "to", "userID", ".", "All", "the", "entries", "of", "the", "group", "will", "be", "sent", "to", "the", "target", "user", "." ]
870756997faec1e1bfabfac0cd6c2395b04da873
https://github.com/igniterealtime/Smack/blob/870756997faec1e1bfabfac0cd6c2395b04da873/smack-legacy/src/main/java/org/jivesoftware/smackx/xroster/RosterExchangeManager.java#L165-L178
26,492
igniterealtime/Smack
smack-legacy/src/main/java/org/jivesoftware/smackx/xroster/RosterExchangeManager.java
RosterExchangeManager.fireRosterExchangeListeners
private void fireRosterExchangeListeners(Jid from, Iterator<RemoteRosterEntry> remoteRosterEntries) { RosterExchangeListener[] listeners; synchronized (rosterExchangeListeners) { listeners = new RosterExchangeListener[rosterExchangeListeners.size()]; rosterExchangeListeners.toArr...
java
private void fireRosterExchangeListeners(Jid from, Iterator<RemoteRosterEntry> remoteRosterEntries) { RosterExchangeListener[] listeners; synchronized (rosterExchangeListeners) { listeners = new RosterExchangeListener[rosterExchangeListeners.size()]; rosterExchangeListeners.toArr...
[ "private", "void", "fireRosterExchangeListeners", "(", "Jid", "from", ",", "Iterator", "<", "RemoteRosterEntry", ">", "remoteRosterEntries", ")", "{", "RosterExchangeListener", "[", "]", "listeners", ";", "synchronized", "(", "rosterExchangeListeners", ")", "{", "list...
Fires roster exchange listeners.
[ "Fires", "roster", "exchange", "listeners", "." ]
870756997faec1e1bfabfac0cd6c2395b04da873
https://github.com/igniterealtime/Smack/blob/870756997faec1e1bfabfac0cd6c2395b04da873/smack-legacy/src/main/java/org/jivesoftware/smackx/xroster/RosterExchangeManager.java#L183-L192
26,493
igniterealtime/Smack
smack-extensions/src/main/java/org/jivesoftware/smackx/search/UserSearch.java
UserSearch.getSearchForm
public Form getSearchForm(XMPPConnection con, DomainBareJid searchService) throws NoResponseException, XMPPErrorException, NotConnectedException, InterruptedException { UserSearch search = new UserSearch(); search.setType(IQ.Type.get); search.setTo(searchService); IQ response = con.crea...
java
public Form getSearchForm(XMPPConnection con, DomainBareJid searchService) throws NoResponseException, XMPPErrorException, NotConnectedException, InterruptedException { UserSearch search = new UserSearch(); search.setType(IQ.Type.get); search.setTo(searchService); IQ response = con.crea...
[ "public", "Form", "getSearchForm", "(", "XMPPConnection", "con", ",", "DomainBareJid", "searchService", ")", "throws", "NoResponseException", ",", "XMPPErrorException", ",", "NotConnectedException", ",", "InterruptedException", "{", "UserSearch", "search", "=", "new", "...
Returns the form for all search fields supported by the search service. @param con the current XMPPConnection. @param searchService the search service to use. (ex. search.jivesoftware.com) @return the search form received by the server. @throws XMPPErrorException @throws NoResponseException @throws NotConnec...
[ "Returns", "the", "form", "for", "all", "search", "fields", "supported", "by", "the", "search", "service", "." ]
870756997faec1e1bfabfac0cd6c2395b04da873
https://github.com/igniterealtime/Smack/blob/870756997faec1e1bfabfac0cd6c2395b04da873/smack-extensions/src/main/java/org/jivesoftware/smackx/search/UserSearch.java#L73-L80
26,494
igniterealtime/Smack
smack-extensions/src/main/java/org/jivesoftware/smackx/receipts/DeliveryReceiptRequest.java
DeliveryReceiptRequest.addTo
public static String addTo(Message message) { if (message.getStanzaId() == null) { message.setStanzaId(StanzaIdUtil.newStanzaId()); } message.addExtension(new DeliveryReceiptRequest()); return message.getStanzaId(); }
java
public static String addTo(Message message) { if (message.getStanzaId() == null) { message.setStanzaId(StanzaIdUtil.newStanzaId()); } message.addExtension(new DeliveryReceiptRequest()); return message.getStanzaId(); }
[ "public", "static", "String", "addTo", "(", "Message", "message", ")", "{", "if", "(", "message", ".", "getStanzaId", "(", ")", "==", "null", ")", "{", "message", ".", "setStanzaId", "(", "StanzaIdUtil", ".", "newStanzaId", "(", ")", ")", ";", "}", "me...
Add a delivery receipt request to an outgoing packet. Only message packets may contain receipt requests as of XEP-0184, therefore only allow Message as the parameter type. @param message Message object to add a request to @return the Message ID which will be used as receipt ID
[ "Add", "a", "delivery", "receipt", "request", "to", "an", "outgoing", "packet", "." ]
870756997faec1e1bfabfac0cd6c2395b04da873
https://github.com/igniterealtime/Smack/blob/870756997faec1e1bfabfac0cd6c2395b04da873/smack-extensions/src/main/java/org/jivesoftware/smackx/receipts/DeliveryReceiptRequest.java#L86-L92
26,495
igniterealtime/Smack
smack-openpgp/src/main/java/org/jivesoftware/smackx/ox/util/OpenPgpPubSubUtil.java
OpenPgpPubSubUtil.publishPublicKey
public static void publishPublicKey(PepManager pepManager, PubkeyElement pubkeyElement, OpenPgpV4Fingerprint fingerprint) throws InterruptedException, PubSubException.NotALeafNodeException, XMPPException.XMPPErrorException, SmackException.NotConnectedException, SmackException.NoResponseException...
java
public static void publishPublicKey(PepManager pepManager, PubkeyElement pubkeyElement, OpenPgpV4Fingerprint fingerprint) throws InterruptedException, PubSubException.NotALeafNodeException, XMPPException.XMPPErrorException, SmackException.NotConnectedException, SmackException.NoResponseException...
[ "public", "static", "void", "publishPublicKey", "(", "PepManager", "pepManager", ",", "PubkeyElement", "pubkeyElement", ",", "OpenPgpV4Fingerprint", "fingerprint", ")", "throws", "InterruptedException", ",", "PubSubException", ".", "NotALeafNodeException", ",", "XMPPExcepti...
Publish the users OpenPGP public key to the public key node if necessary. Also announce the key to other users by updating the metadata node. @see <a href="https://xmpp.org/extensions/xep-0373.html#annoucning-pubkey">XEP-0373 §4.1</a> @param pepManager The PEP manager. @param pubkeyElement {@link PubkeyElement} conta...
[ "Publish", "the", "users", "OpenPGP", "public", "key", "to", "the", "public", "key", "node", "if", "necessary", ".", "Also", "announce", "the", "key", "to", "other", "users", "by", "updating", "the", "metadata", "node", "." ]
870756997faec1e1bfabfac0cd6c2395b04da873
https://github.com/igniterealtime/Smack/blob/870756997faec1e1bfabfac0cd6c2395b04da873/smack-openpgp/src/main/java/org/jivesoftware/smackx/ox/util/OpenPgpPubSubUtil.java#L126-L162
26,496
igniterealtime/Smack
smack-openpgp/src/main/java/org/jivesoftware/smackx/ox/util/OpenPgpPubSubUtil.java
OpenPgpPubSubUtil.fetchPubkeysList
public static PublicKeysListElement fetchPubkeysList(XMPPConnection connection) throws InterruptedException, XMPPException.XMPPErrorException, PubSubException.NotAPubSubNodeException, PubSubException.NotALeafNodeException, SmackException.NotConnectedException, SmackException.NoResponseException ...
java
public static PublicKeysListElement fetchPubkeysList(XMPPConnection connection) throws InterruptedException, XMPPException.XMPPErrorException, PubSubException.NotAPubSubNodeException, PubSubException.NotALeafNodeException, SmackException.NotConnectedException, SmackException.NoResponseException ...
[ "public", "static", "PublicKeysListElement", "fetchPubkeysList", "(", "XMPPConnection", "connection", ")", "throws", "InterruptedException", ",", "XMPPException", ".", "XMPPErrorException", ",", "PubSubException", ".", "NotAPubSubNodeException", ",", "PubSubException", ".", ...
Consult the public key metadata node and fetch a list of all of our published OpenPGP public keys. @see <a href="https://xmpp.org/extensions/xep-0373.html#discover-pubkey-list"> XEP-0373 §4.3: Discovering Public Keys of a User</a> @param connection XMPP connection @return content of our metadata node. @throws Interr...
[ "Consult", "the", "public", "key", "metadata", "node", "and", "fetch", "a", "list", "of", "all", "of", "our", "published", "OpenPGP", "public", "keys", "." ]
870756997faec1e1bfabfac0cd6c2395b04da873
https://github.com/igniterealtime/Smack/blob/870756997faec1e1bfabfac0cd6c2395b04da873/smack-openpgp/src/main/java/org/jivesoftware/smackx/ox/util/OpenPgpPubSubUtil.java#L180-L184
26,497
igniterealtime/Smack
smack-openpgp/src/main/java/org/jivesoftware/smackx/ox/util/OpenPgpPubSubUtil.java
OpenPgpPubSubUtil.deletePubkeysListNode
public static boolean deletePubkeysListNode(PepManager pepManager) throws XMPPException.XMPPErrorException, SmackException.NotConnectedException, InterruptedException, SmackException.NoResponseException { PubSubManager pm = pepManager.getPepPubSubManager(); return pm.deleteNode(P...
java
public static boolean deletePubkeysListNode(PepManager pepManager) throws XMPPException.XMPPErrorException, SmackException.NotConnectedException, InterruptedException, SmackException.NoResponseException { PubSubManager pm = pepManager.getPepPubSubManager(); return pm.deleteNode(P...
[ "public", "static", "boolean", "deletePubkeysListNode", "(", "PepManager", "pepManager", ")", "throws", "XMPPException", ".", "XMPPErrorException", ",", "SmackException", ".", "NotConnectedException", ",", "InterruptedException", ",", "SmackException", ".", "NoResponseExcep...
Delete our metadata node. @param pepManager The PEP manager. @throws XMPPException.XMPPErrorException in case of an XMPP protocol error. @throws SmackException.NotConnectedException if we are not connected. @throws InterruptedException if the thread is interrupted. @throws SmackException.NoResponseException if the se...
[ "Delete", "our", "metadata", "node", "." ]
870756997faec1e1bfabfac0cd6c2395b04da873
https://github.com/igniterealtime/Smack/blob/870756997faec1e1bfabfac0cd6c2395b04da873/smack-openpgp/src/main/java/org/jivesoftware/smackx/ox/util/OpenPgpPubSubUtil.java#L230-L235
26,498
igniterealtime/Smack
smack-openpgp/src/main/java/org/jivesoftware/smackx/ox/util/OpenPgpPubSubUtil.java
OpenPgpPubSubUtil.deleteSecretKeyNode
public static boolean deleteSecretKeyNode(PepManager pepManager) throws XMPPException.XMPPErrorException, SmackException.NotConnectedException, InterruptedException, SmackException.NoResponseException { PubSubManager pm = pepManager.getPepPubSubManager(); return pm.deleteNode(PEP...
java
public static boolean deleteSecretKeyNode(PepManager pepManager) throws XMPPException.XMPPErrorException, SmackException.NotConnectedException, InterruptedException, SmackException.NoResponseException { PubSubManager pm = pepManager.getPepPubSubManager(); return pm.deleteNode(PEP...
[ "public", "static", "boolean", "deleteSecretKeyNode", "(", "PepManager", "pepManager", ")", "throws", "XMPPException", ".", "XMPPErrorException", ",", "SmackException", ".", "NotConnectedException", ",", "InterruptedException", ",", "SmackException", ".", "NoResponseExcepti...
Delete the private backup node. @param pepManager the PEP manager. @throws XMPPException.XMPPErrorException if there is an XMPP protocol related issue @throws SmackException.NotConnectedException if we are not connected @throws InterruptedException if the thread gets interrupted @throws SmackException.NoResponseExcep...
[ "Delete", "the", "private", "backup", "node", "." ]
870756997faec1e1bfabfac0cd6c2395b04da873
https://github.com/igniterealtime/Smack/blob/870756997faec1e1bfabfac0cd6c2395b04da873/smack-openpgp/src/main/java/org/jivesoftware/smackx/ox/util/OpenPgpPubSubUtil.java#L396-L401
26,499
igniterealtime/Smack
smack-experimental/src/main/java/org/jivesoftware/smackx/iot/discovery/IoTDiscoveryManager.java
IoTDiscoveryManager.findRegistry
public Jid findRegistry() throws NoResponseException, XMPPErrorException, NotConnectedException, InterruptedException { if (preconfiguredRegistry != null) { return preconfiguredRegistry; } final XMPPConnection connection = connection(); ServiceDiscoveryMa...
java
public Jid findRegistry() throws NoResponseException, XMPPErrorException, NotConnectedException, InterruptedException { if (preconfiguredRegistry != null) { return preconfiguredRegistry; } final XMPPConnection connection = connection(); ServiceDiscoveryMa...
[ "public", "Jid", "findRegistry", "(", ")", "throws", "NoResponseException", ",", "XMPPErrorException", ",", "NotConnectedException", ",", "InterruptedException", "{", "if", "(", "preconfiguredRegistry", "!=", "null", ")", "{", "return", "preconfiguredRegistry", ";", "...
Try to find an XMPP IoT registry. @return the JID of a Thing Registry if one could be found, <code>null</code> otherwise. @throws InterruptedException @throws NotConnectedException @throws XMPPErrorException @throws NoResponseException @see <a href="http://xmpp.org/extensions/xep-0347.html#findingregistry">XEP-0347 § ...
[ "Try", "to", "find", "an", "XMPP", "IoT", "registry", "." ]
870756997faec1e1bfabfac0cd6c2395b04da873
https://github.com/igniterealtime/Smack/blob/870756997faec1e1bfabfac0cd6c2395b04da873/smack-experimental/src/main/java/org/jivesoftware/smackx/iot/discovery/IoTDiscoveryManager.java#L220-L234