Java 类javax.lang.model.element.AnnotationValueVisitor 实例源码
项目:javaide
文件:Attribute.java
public <R, P> R accept(AnnotationValueVisitor<R, P> v, P p) {
if (value instanceof String)
return v.visitString((String) value, p);
if (value instanceof Integer) {
int i = (Integer) value;
switch (type.tag) {
case BOOLEAN: return v.visitBoolean(i != 0, p);
case CHAR: return v.visitChar((char) i, p);
case BYTE: return v.visitByte((byte) i, p);
case SHORT: return v.visitShort((short) i, p);
case INT: return v.visitInt(i, p);
}
}
switch (type.tag) {
case LONG: return v.visitLong((Long) value, p);
case FLOAT: return v.visitFloat((Float) value, p);
case DOUBLE: return v.visitDouble((Double) value, p);
}
throw new AssertionError("Bad annotation element value: " + value);
}
项目:OpenJSharp
文件:Attribute.java
public <R, P> R accept(AnnotationValueVisitor<R, P> v, P p) {
if (value instanceof String)
return v.visitString((String) value, p);
if (value instanceof Integer) {
int i = (Integer) value;
switch (type.getTag()) {
case BOOLEAN: return v.visitBoolean(i != 0, p);
case CHAR: return v.visitChar((char) i, p);
case BYTE: return v.visitByte((byte) i, p);
case SHORT: return v.visitShort((short) i, p);
case INT: return v.visitInt(i, p);
}
}
switch (type.getTag()) {
case LONG: return v.visitLong((Long) value, p);
case FLOAT: return v.visitFloat((Float) value, p);
case DOUBLE: return v.visitDouble((Double) value, p);
}
throw new AssertionError("Bad annotation element value: " + value);
}
项目:openjdk-jdk10
文件:Attribute.java
@DefinedBy(Api.LANGUAGE_MODEL)
public <R, P> R accept(AnnotationValueVisitor<R, P> v, P p) {
if (value instanceof String)
return v.visitString((String) value, p);
if (value instanceof Integer) {
int i = (Integer) value;
switch (type.getTag()) {
case BOOLEAN: return v.visitBoolean(i != 0, p);
case CHAR: return v.visitChar((char) i, p);
case BYTE: return v.visitByte((byte) i, p);
case SHORT: return v.visitShort((short) i, p);
case INT: return v.visitInt(i, p);
}
}
switch (type.getTag()) {
case LONG: return v.visitLong((Long) value, p);
case FLOAT: return v.visitFloat((Float) value, p);
case DOUBLE: return v.visitDouble((Double) value, p);
}
throw new AssertionError("Bad annotation element value: " + value);
}
项目:openjdk9
文件:Attribute.java
@DefinedBy(Api.LANGUAGE_MODEL)
public <R, P> R accept(AnnotationValueVisitor<R, P> v, P p) {
if (value instanceof String)
return v.visitString((String) value, p);
if (value instanceof Integer) {
int i = (Integer) value;
switch (type.getTag()) {
case BOOLEAN: return v.visitBoolean(i != 0, p);
case CHAR: return v.visitChar((char) i, p);
case BYTE: return v.visitByte((byte) i, p);
case SHORT: return v.visitShort((short) i, p);
case INT: return v.visitInt(i, p);
}
}
switch (type.getTag()) {
case LONG: return v.visitLong((Long) value, p);
case FLOAT: return v.visitFloat((Float) value, p);
case DOUBLE: return v.visitDouble((Double) value, p);
}
throw new AssertionError("Bad annotation element value: " + value);
}
项目:lookaside_java-1.8.0-openjdk
文件:Attribute.java
public <R, P> R accept(AnnotationValueVisitor<R, P> v, P p) {
if (value instanceof String)
return v.visitString((String) value, p);
if (value instanceof Integer) {
int i = (Integer) value;
switch (type.getTag()) {
case BOOLEAN: return v.visitBoolean(i != 0, p);
case CHAR: return v.visitChar((char) i, p);
case BYTE: return v.visitByte((byte) i, p);
case SHORT: return v.visitShort((short) i, p);
case INT: return v.visitInt(i, p);
}
}
switch (type.getTag()) {
case LONG: return v.visitLong((Long) value, p);
case FLOAT: return v.visitFloat((Float) value, p);
case DOUBLE: return v.visitDouble((Double) value, p);
}
throw new AssertionError("Bad annotation element value: " + value);
}
项目:jsr308-langtools
文件:Attribute.java
public <R, P> R accept(AnnotationValueVisitor<R, P> v, P p) {
if (value instanceof String)
return v.visitString((String) value, p);
if (value instanceof Integer) {
int i = (Integer) value;
switch (type.getTag()) {
case BOOLEAN: return v.visitBoolean(i != 0, p);
case CHAR: return v.visitChar((char) i, p);
case BYTE: return v.visitByte((byte) i, p);
case SHORT: return v.visitShort((short) i, p);
case INT: return v.visitInt(i, p);
}
}
switch (type.getTag()) {
case LONG: return v.visitLong((Long) value, p);
case FLOAT: return v.visitFloat((Float) value, p);
case DOUBLE: return v.visitDouble((Double) value, p);
}
throw new AssertionError("Bad annotation element value: " + value);
}
项目:form-follows-function
文件:Attribute.java
public <R, P> R accept(AnnotationValueVisitor<R, P> v, P p) {
if (value instanceof String)
return v.visitString((String) value, p);
if (value instanceof Integer) {
int i = (Integer) value;
switch (type.tag) {
case BOOLEAN: return v.visitBoolean(i != 0, p);
case CHAR: return v.visitChar((char) i, p);
case BYTE: return v.visitByte((byte) i, p);
case SHORT: return v.visitShort((short) i, p);
case INT: return v.visitInt(i, p);
}
}
switch (type.tag) {
case LONG: return v.visitLong((Long) value, p);
case FLOAT: return v.visitFloat((Float) value, p);
case DOUBLE: return v.visitDouble((Double) value, p);
}
throw new AssertionError("Bad annotation element value: " + value);
}
项目:infobip-open-jdk-8
文件:Attribute.java
public <R, P> R accept(AnnotationValueVisitor<R, P> v, P p) {
if (value instanceof String)
return v.visitString((String) value, p);
if (value instanceof Integer) {
int i = (Integer) value;
switch (type.getTag()) {
case BOOLEAN: return v.visitBoolean(i != 0, p);
case CHAR: return v.visitChar((char) i, p);
case BYTE: return v.visitByte((byte) i, p);
case SHORT: return v.visitShort((short) i, p);
case INT: return v.visitInt(i, p);
}
}
switch (type.getTag()) {
case LONG: return v.visitLong((Long) value, p);
case FLOAT: return v.visitFloat((Float) value, p);
case DOUBLE: return v.visitDouble((Double) value, p);
}
throw new AssertionError("Bad annotation element value: " + value);
}
项目:openjdk-source-code-learn
文件:Attribute.java
public <R, P> R accept(AnnotationValueVisitor<R, P> v, P p) {
if (value instanceof String)
return v.visitString((String) value, p);
if (value instanceof Integer) {
int i = (Integer) value;
switch (type.tag) {
case BOOLEAN: return v.visitBoolean(i != 0, p);
case CHAR: return v.visitChar((char) i, p);
case BYTE: return v.visitByte((byte) i, p);
case SHORT: return v.visitShort((short) i, p);
case INT: return v.visitInt(i, p);
}
}
switch (type.tag) {
case LONG: return v.visitLong((Long) value, p);
case FLOAT: return v.visitFloat((Float) value, p);
case DOUBLE: return v.visitDouble((Double) value, p);
}
throw new AssertionError("Bad annotation element value: " + value);
}
项目:OLD-OpenJDK8
文件:Attribute.java
public <R, P> R accept(AnnotationValueVisitor<R, P> v, P p) {
if (value instanceof String)
return v.visitString((String) value, p);
if (value instanceof Integer) {
int i = (Integer) value;
switch (type.getTag()) {
case BOOLEAN: return v.visitBoolean(i != 0, p);
case CHAR: return v.visitChar((char) i, p);
case BYTE: return v.visitByte((byte) i, p);
case SHORT: return v.visitShort((short) i, p);
case INT: return v.visitInt(i, p);
}
}
switch (type.getTag()) {
case LONG: return v.visitLong((Long) value, p);
case FLOAT: return v.visitFloat((Float) value, p);
case DOUBLE: return v.visitDouble((Double) value, p);
}
throw new AssertionError("Bad annotation element value: " + value);
}
项目:s4j
文件:Attribute.java
public <R, P> R accept(AnnotationValueVisitor<R, P> v, P p) {
if (value instanceof String)
return v.visitString((String) value, p);
if (value instanceof Integer) {
int i = (Integer) value;
switch (type.tag) {
case BOOLEAN: return v.visitBoolean(i != 0, p);
case CHAR: return v.visitChar((char) i, p);
case BYTE: return v.visitByte((byte) i, p);
case SHORT: return v.visitShort((short) i, p);
case INT: return v.visitInt(i, p);
}
}
switch (type.tag) {
case LONG: return v.visitLong((Long) value, p);
case FLOAT: return v.visitFloat((Float) value, p);
case DOUBLE: return v.visitDouble((Double) value, p);
}
throw new AssertionError("Bad annotation element value: " + value);
}
项目:jdk7-langtools
文件:Attribute.java
public <R, P> R accept(AnnotationValueVisitor<R, P> v, P p) {
if (value instanceof String)
return v.visitString((String) value, p);
if (value instanceof Integer) {
int i = (Integer) value;
switch (type.tag) {
case BOOLEAN: return v.visitBoolean(i != 0, p);
case CHAR: return v.visitChar((char) i, p);
case BYTE: return v.visitByte((byte) i, p);
case SHORT: return v.visitShort((short) i, p);
case INT: return v.visitInt(i, p);
}
}
switch (type.tag) {
case LONG: return v.visitLong((Long) value, p);
case FLOAT: return v.visitFloat((Float) value, p);
case DOUBLE: return v.visitDouble((Double) value, p);
}
throw new AssertionError("Bad annotation element value: " + value);
}
项目:javap
文件:Attribute.java
public <R, P> R accept(AnnotationValueVisitor<R, P> v, P p) {
if (value instanceof String)
return v.visitString((String) value, p);
if (value instanceof Integer) {
int i = (Integer) value;
switch (type.tag) {
case BOOLEAN: return v.visitBoolean(i != 0, p);
case CHAR: return v.visitChar((char) i, p);
case BYTE: return v.visitByte((byte) i, p);
case SHORT: return v.visitShort((short) i, p);
case INT: return v.visitInt(i, p);
}
}
switch (type.tag) {
case LONG: return v.visitLong((Long) value, p);
case FLOAT: return v.visitFloat((Float) value, p);
case DOUBLE: return v.visitDouble((Double) value, p);
}
throw new AssertionError("Bad annotation element value: " + value);
}
项目:openjdk-icedtea7
文件:Attribute.java
public <R, P> R accept(AnnotationValueVisitor<R, P> v, P p) {
if (value instanceof String)
return v.visitString((String) value, p);
if (value instanceof Integer) {
int i = (Integer) value;
switch (type.tag) {
case BOOLEAN: return v.visitBoolean(i != 0, p);
case CHAR: return v.visitChar((char) i, p);
case BYTE: return v.visitByte((byte) i, p);
case SHORT: return v.visitShort((short) i, p);
case INT: return v.visitInt(i, p);
}
}
switch (type.tag) {
case LONG: return v.visitLong((Long) value, p);
case FLOAT: return v.visitFloat((Float) value, p);
case DOUBLE: return v.visitDouble((Double) value, p);
}
throw new AssertionError("Bad annotation element value: " + value);
}
项目:metricgenerator-jdk-compiler
文件:Attribute.java
public <R, P> R accept(AnnotationValueVisitor<R, P> v, P p) {
if (value instanceof String)
return v.visitString((String) value, p);
if (value instanceof Integer) {
int i = (Integer) value;
switch (type.tag) {
case BOOLEAN: return v.visitBoolean(i != 0, p);
case CHAR: return v.visitChar((char) i, p);
case BYTE: return v.visitByte((byte) i, p);
case SHORT: return v.visitShort((short) i, p);
case INT: return v.visitInt(i, p);
}
}
switch (type.tag) {
case LONG: return v.visitLong((Long) value, p);
case FLOAT: return v.visitFloat((Float) value, p);
case DOUBLE: return v.visitDouble((Double) value, p);
}
throw new AssertionError("Bad annotation element value: " + value);
}
项目:buck
文件:TreeBackedAnnotationValue.java
@Override
public <R, P> R accept(AnnotationValueVisitor<R, P> v, @Nullable P p) {
Object underlyingValue = underlyingAnnotationValue.getValue();
Object value = getValue();
if (underlyingValue.equals(value)) {
return underlyingAnnotationValue.accept(v, p);
}
if (value instanceof TreeBackedVariableElement) {
return v.visitEnumConstant((TreeBackedVariableElement) value, p);
} else if (value instanceof TypeMirror) {
return v.visitType((TypeMirror) value, p);
} else if (value instanceof TreeBackedAnnotationMirror) {
return v.visitAnnotation((TreeBackedAnnotationMirror) value, p);
} else if (value instanceof List) {
@SuppressWarnings("unchecked")
List<? extends AnnotationValue> valuesList = (List<? extends AnnotationValue>) value;
return v.visitArray(valuesList, p);
} else {
throw new IllegalStateException(String.format("Unexpected annotation value: %s", value));
}
}
项目:INF5000-StaticProxy
文件:Attribute.java
public <R, P> R accept(AnnotationValueVisitor<R, P> v, P p) {
if (value instanceof String)
return v.visitString((String) value, p);
if (value instanceof Integer) {
int i = (Integer) value;
switch (type.tag) {
case BOOLEAN: return v.visitBoolean(i != 0, p);
case CHAR: return v.visitChar((char) i, p);
case BYTE: return v.visitByte((byte) i, p);
case SHORT: return v.visitShort((short) i, p);
case INT: return v.visitInt(i, p);
}
}
switch (type.tag) {
case LONG: return v.visitLong((Long) value, p);
case FLOAT: return v.visitFloat((Float) value, p);
case DOUBLE: return v.visitDouble((Double) value, p);
}
throw new AssertionError("Bad annotation element value: " + value);
}
项目:Eclipse-Postfix-Code-Completion
文件:AnnotationValueImpl.java
@SuppressWarnings("unchecked") // Need to cast Object _value to a List<AnnotationValue>
@Override
public <R, P> R accept(AnnotationValueVisitor<R, P> v, P p) {
switch (_kind) {
case TypeIds.T_boolean:
return v.visitBoolean((Boolean)_value, p);
case TypeIds.T_byte:
return v.visitByte((Byte)_value, p);
case TypeIds.T_char:
return v.visitChar((Character)_value, p);
case TypeIds.T_double:
return v.visitDouble((Double)_value, p);
case TypeIds.T_float:
return v.visitFloat((Float)_value, p);
case TypeIds.T_int:
return v.visitInt((Integer)_value, p);
case TypeIds.T_JavaLangString:
return v.visitString((String)_value, p);
case TypeIds.T_long:
return v.visitLong((Long)_value, p);
case TypeIds.T_short:
return v.visitShort((Short)_value, p);
case T_EnumConstant:
return v.visitEnumConstant((VariableElement)_value, p);
case T_ClassObject:
return v.visitType((TypeMirror)_value, p);
case T_AnnotationMirror:
return v.visitAnnotation((AnnotationMirror)_value, p);
case T_ArrayType:
return v.visitArray((List<AnnotationValue>)_value, p);
default:
return null;
}
}
项目:Eclipse-Postfix-Code-Completion-Juno38
文件:AnnotationValueImpl.java
@SuppressWarnings("unchecked") // Need to cast Object _value to a List<AnnotationValue>
@Override
public <R, P> R accept(AnnotationValueVisitor<R, P> v, P p) {
switch (_kind) {
case TypeIds.T_boolean:
return v.visitBoolean((Boolean)_value, p);
case TypeIds.T_byte:
return v.visitByte((Byte)_value, p);
case TypeIds.T_char:
return v.visitChar((Character)_value, p);
case TypeIds.T_double:
return v.visitDouble((Double)_value, p);
case TypeIds.T_float:
return v.visitFloat((Float)_value, p);
case TypeIds.T_int:
return v.visitInt((Integer)_value, p);
case TypeIds.T_JavaLangString:
return v.visitString((String)_value, p);
case TypeIds.T_long:
return v.visitLong((Long)_value, p);
case TypeIds.T_short:
return v.visitShort((Short)_value, p);
case T_EnumConstant:
return v.visitEnumConstant((VariableElement)_value, p);
case T_ClassObject:
return v.visitType((TypeMirror)_value, p);
case T_AnnotationMirror:
return v.visitAnnotation((AnnotationMirror)_value, p);
case T_ArrayType:
return v.visitArray((List<AnnotationValue>)_value, p);
default:
return null;
}
}
项目:javaide
文件:Attribute.java
public <R, P> R accept(AnnotationValueVisitor<R, P> v, P p) {
throw new UnsupportedOperationException();
}
项目:javaide
文件:Attribute.java
public <R, P> R accept(AnnotationValueVisitor<R, P> v, P p) {
return v.visitType(type, p);
}
项目:javaide
文件:Attribute.java
public <R, P> R accept(AnnotationValueVisitor<R, P> v, P p) {
return v.visitAnnotation(this, p);
}
项目:javaide
文件:Attribute.java
public <R, P> R accept(AnnotationValueVisitor<R, P> v, P p) {
return v.visitArray(getValue(), p);
}
项目:javaide
文件:Attribute.java
public <R, P> R accept(AnnotationValueVisitor<R, P> v, P p) {
return v.visitEnumConstant(value, p);
}
项目:javaide
文件:Attribute.java
public <R, P> R accept(AnnotationValueVisitor<R, P> v, P p) {
return v.visitString(toString(), p);
}
项目:OpenJSharp
文件:Attribute.java
public <R, P> R accept(AnnotationValueVisitor<R, P> v, P p) {
throw new UnsupportedOperationException();
}
项目:OpenJSharp
文件:Attribute.java
public <R, P> R accept(AnnotationValueVisitor<R, P> v, P p) {
return v.visitType(classType, p);
}
项目:OpenJSharp
文件:Attribute.java
public <R, P> R accept(AnnotationValueVisitor<R, P> v, P p) {
return v.visitAnnotation(this, p);
}
项目:OpenJSharp
文件:Attribute.java
public <R, P> R accept(AnnotationValueVisitor<R, P> v, P p) {
return v.visitArray(getValue(), p);
}
项目:OpenJSharp
文件:Attribute.java
public <R, P> R accept(AnnotationValueVisitor<R, P> v, P p) {
return v.visitEnumConstant(value, p);
}
项目:OpenJSharp
文件:Attribute.java
public <R, P> R accept(AnnotationValueVisitor<R, P> v, P p) {
return v.visitString(toString(), p);
}
项目:openjdk-jdk10
文件:Attribute.java
@DefinedBy(Api.LANGUAGE_MODEL)
public <R, P> R accept(AnnotationValueVisitor<R, P> v, P p) {
throw new UnsupportedOperationException();
}
项目:openjdk-jdk10
文件:Attribute.java
@DefinedBy(Api.LANGUAGE_MODEL)
public <R, P> R accept(AnnotationValueVisitor<R, P> v, P p) {
return v.visitType(classType, p);
}
项目:openjdk-jdk10
文件:Attribute.java
@DefinedBy(Api.LANGUAGE_MODEL)
public <R, P> R accept(AnnotationValueVisitor<R, P> v, P p) {
return v.visitAnnotation(this, p);
}
项目:openjdk-jdk10
文件:Attribute.java
@DefinedBy(Api.LANGUAGE_MODEL)
public <R, P> R accept(AnnotationValueVisitor<R, P> v, P p) {
return v.visitArray(getValue(), p);
}
项目:openjdk-jdk10
文件:Attribute.java
@DefinedBy(Api.LANGUAGE_MODEL)
public <R, P> R accept(AnnotationValueVisitor<R, P> v, P p) {
return v.visitEnumConstant(value, p);
}
项目:openjdk-jdk10
文件:Attribute.java
@DefinedBy(Api.LANGUAGE_MODEL)
public <R, P> R accept(AnnotationValueVisitor<R, P> v, P p) {
return v.visitString(toString(), p);
}
项目:openjdk9
文件:Attribute.java
@DefinedBy(Api.LANGUAGE_MODEL)
public <R, P> R accept(AnnotationValueVisitor<R, P> v, P p) {
throw new UnsupportedOperationException();
}
项目:openjdk9
文件:Attribute.java
@DefinedBy(Api.LANGUAGE_MODEL)
public <R, P> R accept(AnnotationValueVisitor<R, P> v, P p) {
return v.visitType(classType, p);
}
项目:openjdk9
文件:Attribute.java
@DefinedBy(Api.LANGUAGE_MODEL)
public <R, P> R accept(AnnotationValueVisitor<R, P> v, P p) {
return v.visitAnnotation(this, p);
}