Many resources are needed to download a project. Please understand that we have to compensate our server costs. Thank you in advance. Project price only 1 $
You can buy this project and download/modify it how often you want.
package act.util;
/*-
* #%L
* ACT Framework
* %%
* Copyright (C) 2014 - 2017 ActFramework
* %%
* Licensed under the Apache License, Version 2.0 (the "License");
* you may not use this file except in compliance with the License.
* You may obtain a copy of the License at
*
* http://www.apache.org/licenses/LICENSE-2.0
*
* Unless required by applicable law or agreed to in writing, software
* distributed under the License is distributed on an "AS IS" BASIS,
* WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
* See the License for the specific language governing permissions and
* limitations under the License.
* #L%
*/
import act.asm.AnnotationVisitor;
import act.asm.Opcodes;
import act.asm.Type;
import org.osgl.$;
import org.osgl.util.C;
import org.osgl.util.E;
import org.osgl.util.S;
import java.io.Serializable;
import java.lang.annotation.Annotation;
import java.lang.reflect.Array;
import java.lang.reflect.InvocationHandler;
import java.lang.reflect.Method;
import java.lang.reflect.Proxy;
import java.util.HashMap;
import java.util.List;
import java.util.Map;
public class GeneralAnnoInfo {
public static class EnumInfo {
private Type type;
private String value;
EnumInfo(String desc, String value) {
this.type = Type.getType(desc);
this.value = value;
}
public Type type() {
return type;
}
public String value() {
return value;
}
}
private Type type;
private Map attributes = new HashMap<>();
private Map> listAttributes = new HashMap<>();
public GeneralAnnoInfo(Type type) {
E.NPE(type);
this.type = type;
}
public Type type() {
return type;
}
public Map attributes() {
return C.Map(attributes);
}
public GeneralAnnoInfo addAnnotation(String name, Type type) {
GeneralAnnoInfo anno = new GeneralAnnoInfo(type);
attributes.put(name, anno);
return anno;
}
public void putAttribute(String name, Object val) {
attributes.put(name, val);
}
public void putListAttribute(String name, Object val) {
List