鏡像自
https://github.com/SonarSource/sonarqube.git
synced 2024-08-27 17:54:34 +02:00
Execute Protocol Buffer compiler during build
Dependency for compiler selected based on platform. Supported platforms are Windows/Linux x86/64 and Mac OS. Configuration in root POM to avoid duplication. This also makes version of compiler consistent with version of library. Previously it was 3.0.0-a3 and 3.0.0-beta-1 respectively, now both are 3.0.0-beta-1. And removes all existing auto generated files and scripts for their creation as well as their traces (such as comments and exclusions for SonarQube).
This commit is contained in:
父節點
bed7d7f189
當前提交
d7d20c58c7
@ -1,31 +0,0 @@
|
||||
#!/bin/bash
|
||||
|
||||
# Compiles all the Protocol Buffers files (*.proto) to Java source code.
|
||||
# Local installation of protobuf compiler is NOT needed.
|
||||
|
||||
# Available versions listed at http://search.maven.org/#search%7Cgav%7C1%7Cg%3A%22com.github.os72%22%20AND%20a%3A%22protoc-jar%22
|
||||
PROTOBUF_VERSION="3.0.0-a3"
|
||||
|
||||
mvn org.apache.maven.plugins:maven-dependency-plugin::copy -Dartifact=com.github.os72:protoc-jar:$PROTOBUF_VERSION -DoutputDirectory=target
|
||||
|
||||
# Usage: compile_protobuf <module> <type: main or test>
|
||||
function compile_protobuf {
|
||||
INPUT="$1/src/$2/protobuf"
|
||||
OUTPUT="$1/src/$2/gen-java"
|
||||
|
||||
if [ -d $INPUT ]
|
||||
then
|
||||
echo "Compiling [$INPUT] to [$OUTPUT]..."
|
||||
rm -rf $OUTPUT
|
||||
mkdir -p $OUTPUT
|
||||
java -jar target/protoc-jar-$PROTOBUF_VERSION.jar --proto_path=$INPUT --java_out=$OUTPUT $INPUT/*.proto
|
||||
fi
|
||||
}
|
||||
|
||||
compile_protobuf "sonar-batch-protocol" "main"
|
||||
compile_protobuf "sonar-core" "test"
|
||||
compile_protobuf "sonar-db" "main"
|
||||
compile_protobuf "sonar-ws" "main"
|
||||
|
||||
|
||||
|
146
pom.xml
146
pom.xml
@ -65,6 +65,10 @@
|
||||
<slf4j.version>1.7.12</slf4j.version>
|
||||
<tomcat.version>8.0.18</tomcat.version>
|
||||
<elasticsearch.version>1.7.2</elasticsearch.version>
|
||||
|
||||
<protobuf.version>3.0.0-beta-1</protobuf.version>
|
||||
<protobuf.compiler>${settings.localRepository}/com/google/protobuf/protoc/${protobuf.version}/protoc-${protobuf.version}-${os.detected.classifier}.exe</protobuf.compiler>
|
||||
|
||||
<project.build.sourceEncoding>UTF-8</project.build.sourceEncoding>
|
||||
<maven.min.version>3.2</maven.min.version>
|
||||
<jdk.min.version>1.7</jdk.min.version>
|
||||
@ -88,6 +92,11 @@
|
||||
<artifactId>wagon-webdav</artifactId>
|
||||
<version>1.0-beta-2</version>
|
||||
</extension>
|
||||
<extension>
|
||||
<groupId>kr.motd.maven</groupId>
|
||||
<artifactId>os-maven-plugin</artifactId>
|
||||
<version>1.4.1.Final</version>
|
||||
</extension>
|
||||
</extensions>
|
||||
|
||||
<pluginManagement>
|
||||
@ -1100,7 +1109,7 @@
|
||||
<dependency>
|
||||
<groupId>com.google.protobuf</groupId>
|
||||
<artifactId>protobuf-java</artifactId>
|
||||
<version>3.0.0-beta-1</version>
|
||||
<version>${protobuf.version}</version>
|
||||
</dependency>
|
||||
<dependency>
|
||||
<groupId>net.jpountz.lz4</groupId>
|
||||
@ -1347,6 +1356,141 @@
|
||||
</build>
|
||||
</profile>
|
||||
|
||||
<profile>
|
||||
<id>protobuf-compile</id>
|
||||
<activation>
|
||||
<file>
|
||||
<exists>src/main/protobuf</exists>
|
||||
</file>
|
||||
</activation>
|
||||
<build>
|
||||
<plugins>
|
||||
<plugin>
|
||||
<groupId>org.apache.maven.plugins</groupId>
|
||||
<artifactId>maven-antrun-plugin</artifactId>
|
||||
<executions>
|
||||
<execution>
|
||||
<id>protobuf-compile</id>
|
||||
<phase>generate-sources</phase>
|
||||
<goals>
|
||||
<goal>run</goal>
|
||||
</goals>
|
||||
<configuration>
|
||||
<target>
|
||||
<fileset id="fileset" dir="${project.basedir}/src/main/protobuf">
|
||||
<include name="*.proto"/>
|
||||
</fileset>
|
||||
<pathconvert refid="fileset" property="protos" pathsep=" "/>
|
||||
<mkdir dir="${project.build.directory}/generated-sources/protobuf"/>
|
||||
<chmod file="${protobuf.compiler}" perm="u+x"/>
|
||||
<exec failonerror="true" executable="${protobuf.compiler}">
|
||||
<arg value="--proto_path=${project.basedir}/src/main/protobuf"/>
|
||||
<arg value="--java_out=${project.build.directory}/generated-sources/protobuf"/>
|
||||
<arg line="${protos}"/>
|
||||
</exec>
|
||||
</target>
|
||||
</configuration>
|
||||
</execution>
|
||||
</executions>
|
||||
<dependencies>
|
||||
<dependency>
|
||||
<groupId>com.google.protobuf</groupId>
|
||||
<artifactId>protoc</artifactId>
|
||||
<version>${protobuf.version}</version>
|
||||
<classifier>${os.detected.classifier}</classifier>
|
||||
<type>exe</type>
|
||||
</dependency>
|
||||
</dependencies>
|
||||
</plugin>
|
||||
<plugin>
|
||||
<groupId>org.codehaus.mojo</groupId>
|
||||
<artifactId>build-helper-maven-plugin</artifactId>
|
||||
<executions>
|
||||
<execution>
|
||||
<id>protobuf-compile</id>
|
||||
<phase>generate-sources</phase>
|
||||
<goals>
|
||||
<goal>add-source</goal>
|
||||
</goals>
|
||||
<configuration>
|
||||
<sources>
|
||||
<source>${project.build.directory}/generated-sources/protobuf</source>
|
||||
</sources>
|
||||
</configuration>
|
||||
</execution>
|
||||
</executions>
|
||||
</plugin>
|
||||
</plugins>
|
||||
</build>
|
||||
</profile>
|
||||
<profile>
|
||||
<id>protobuf-test-compile</id>
|
||||
<activation>
|
||||
<file>
|
||||
<exists>src/test/protobuf</exists>
|
||||
</file>
|
||||
</activation>
|
||||
<build>
|
||||
<plugins>
|
||||
<plugin>
|
||||
<groupId>org.apache.maven.plugins</groupId>
|
||||
<artifactId>maven-antrun-plugin</artifactId>
|
||||
<executions>
|
||||
<execution>
|
||||
<id>protobuf-test-compile</id>
|
||||
<phase>generate-sources</phase>
|
||||
<goals>
|
||||
<goal>run</goal>
|
||||
</goals>
|
||||
<configuration>
|
||||
<target>
|
||||
<fileset id="fileset" dir="${project.basedir}/src/test/protobuf">
|
||||
<include name="*.proto"/>
|
||||
</fileset>
|
||||
<pathconvert refid="fileset" property="protos" pathsep=" "/>
|
||||
<mkdir dir="${project.build.directory}/generated-test-sources/protobuf"/>
|
||||
<chmod file="${protobuf.compiler}" perm="u+x"/>
|
||||
<exec failonerror="true" executable="${protobuf.compiler}">
|
||||
<arg value="--proto_path=${project.basedir}/src/test/protobuf"/>
|
||||
<arg value="--java_out=${project.build.directory}/generated-test-sources/protobuf"/>
|
||||
<arg line="${protos}"/>
|
||||
</exec>
|
||||
</target>
|
||||
</configuration>
|
||||
</execution>
|
||||
</executions>
|
||||
<dependencies>
|
||||
<dependency>
|
||||
<groupId>com.google.protobuf</groupId>
|
||||
<artifactId>protoc</artifactId>
|
||||
<version>${protobuf.version}</version>
|
||||
<classifier>${os.detected.classifier}</classifier>
|
||||
<type>exe</type>
|
||||
</dependency>
|
||||
</dependencies>
|
||||
</plugin>
|
||||
<plugin>
|
||||
<groupId>org.codehaus.mojo</groupId>
|
||||
<artifactId>build-helper-maven-plugin</artifactId>
|
||||
<executions>
|
||||
<execution>
|
||||
<id>protobuf-test-compile</id>
|
||||
<phase>generate-test-sources</phase>
|
||||
<goals>
|
||||
<goal>add-test-source</goal>
|
||||
</goals>
|
||||
<configuration>
|
||||
<sources>
|
||||
<source>${project.build.directory}/generated-test-sources/protobuf</source>
|
||||
</sources>
|
||||
</configuration>
|
||||
</execution>
|
||||
</executions>
|
||||
</plugin>
|
||||
</plugins>
|
||||
</build>
|
||||
</profile>
|
||||
|
||||
<profile>
|
||||
<id>m2e</id>
|
||||
<activation>
|
||||
|
@ -12,10 +12,6 @@
|
||||
|
||||
<description>Classes used for communication between batch and server</description>
|
||||
|
||||
<properties>
|
||||
<sonar.exclusions>src/main/gen-java/**/*</sonar.exclusions>
|
||||
</properties>
|
||||
|
||||
<dependencies>
|
||||
<dependency>
|
||||
<groupId>net.jpountz.lz4</groupId>
|
||||
@ -58,24 +54,6 @@
|
||||
|
||||
<build>
|
||||
<plugins>
|
||||
<plugin>
|
||||
<groupId>org.codehaus.mojo</groupId>
|
||||
<artifactId>build-helper-maven-plugin</artifactId>
|
||||
<executions>
|
||||
<execution>
|
||||
<id>add-source</id>
|
||||
<phase>generate-sources</phase>
|
||||
<goals>
|
||||
<goal>add-source</goal>
|
||||
</goals>
|
||||
<configuration>
|
||||
<sources>
|
||||
<source>src/main/gen-java</source>
|
||||
</sources>
|
||||
</configuration>
|
||||
</execution>
|
||||
</executions>
|
||||
</plugin>
|
||||
<plugin>
|
||||
<groupId>org.apache.maven.plugins</groupId>
|
||||
<artifactId>maven-surefire-plugin</artifactId>
|
||||
@ -85,4 +63,5 @@
|
||||
</plugin>
|
||||
</plugins>
|
||||
</build>
|
||||
|
||||
</project>
|
||||
|
@ -1,824 +0,0 @@
|
||||
// Generated by the protocol buffer compiler. DO NOT EDIT!
|
||||
// source: constants.proto
|
||||
|
||||
package org.sonar.batch.protocol;
|
||||
|
||||
public final class Constants {
|
||||
private Constants() {}
|
||||
public static void registerAllExtensions(
|
||||
com.google.protobuf.ExtensionRegistry registry) {
|
||||
}
|
||||
/**
|
||||
* Protobuf enum {@code Severity}
|
||||
*/
|
||||
public enum Severity
|
||||
implements com.google.protobuf.ProtocolMessageEnum {
|
||||
/**
|
||||
* <code>INFO = 0;</code>
|
||||
*/
|
||||
INFO(0, 0),
|
||||
/**
|
||||
* <code>MINOR = 1;</code>
|
||||
*/
|
||||
MINOR(1, 1),
|
||||
/**
|
||||
* <code>MAJOR = 2;</code>
|
||||
*/
|
||||
MAJOR(2, 2),
|
||||
/**
|
||||
* <code>CRITICAL = 3;</code>
|
||||
*/
|
||||
CRITICAL(3, 3),
|
||||
/**
|
||||
* <code>BLOCKER = 4;</code>
|
||||
*/
|
||||
BLOCKER(4, 4),
|
||||
;
|
||||
|
||||
/**
|
||||
* <code>INFO = 0;</code>
|
||||
*/
|
||||
public static final int INFO_VALUE = 0;
|
||||
/**
|
||||
* <code>MINOR = 1;</code>
|
||||
*/
|
||||
public static final int MINOR_VALUE = 1;
|
||||
/**
|
||||
* <code>MAJOR = 2;</code>
|
||||
*/
|
||||
public static final int MAJOR_VALUE = 2;
|
||||
/**
|
||||
* <code>CRITICAL = 3;</code>
|
||||
*/
|
||||
public static final int CRITICAL_VALUE = 3;
|
||||
/**
|
||||
* <code>BLOCKER = 4;</code>
|
||||
*/
|
||||
public static final int BLOCKER_VALUE = 4;
|
||||
|
||||
|
||||
public final int getNumber() {
|
||||
return value;
|
||||
}
|
||||
|
||||
public static Severity valueOf(int value) {
|
||||
switch (value) {
|
||||
case 0: return INFO;
|
||||
case 1: return MINOR;
|
||||
case 2: return MAJOR;
|
||||
case 3: return CRITICAL;
|
||||
case 4: return BLOCKER;
|
||||
default: return null;
|
||||
}
|
||||
}
|
||||
|
||||
public static com.google.protobuf.Internal.EnumLiteMap<Severity>
|
||||
internalGetValueMap() {
|
||||
return internalValueMap;
|
||||
}
|
||||
private static com.google.protobuf.Internal.EnumLiteMap<Severity>
|
||||
internalValueMap =
|
||||
new com.google.protobuf.Internal.EnumLiteMap<Severity>() {
|
||||
public Severity findValueByNumber(int number) {
|
||||
return Severity.valueOf(number);
|
||||
}
|
||||
};
|
||||
|
||||
public final com.google.protobuf.Descriptors.EnumValueDescriptor
|
||||
getValueDescriptor() {
|
||||
return getDescriptor().getValues().get(index);
|
||||
}
|
||||
public final com.google.protobuf.Descriptors.EnumDescriptor
|
||||
getDescriptorForType() {
|
||||
return getDescriptor();
|
||||
}
|
||||
public static final com.google.protobuf.Descriptors.EnumDescriptor
|
||||
getDescriptor() {
|
||||
return org.sonar.batch.protocol.Constants.getDescriptor().getEnumTypes().get(0);
|
||||
}
|
||||
|
||||
private static final Severity[] VALUES = values();
|
||||
|
||||
public static Severity valueOf(
|
||||
com.google.protobuf.Descriptors.EnumValueDescriptor desc) {
|
||||
if (desc.getType() != getDescriptor()) {
|
||||
throw new java.lang.IllegalArgumentException(
|
||||
"EnumValueDescriptor is not for this type.");
|
||||
}
|
||||
return VALUES[desc.getIndex()];
|
||||
}
|
||||
|
||||
private final int index;
|
||||
private final int value;
|
||||
|
||||
private Severity(int index, int value) {
|
||||
this.index = index;
|
||||
this.value = value;
|
||||
}
|
||||
|
||||
// @@protoc_insertion_point(enum_scope:Severity)
|
||||
}
|
||||
|
||||
/**
|
||||
* Protobuf enum {@code ComponentType}
|
||||
*/
|
||||
public enum ComponentType
|
||||
implements com.google.protobuf.ProtocolMessageEnum {
|
||||
/**
|
||||
* <code>PROJECT = 0;</code>
|
||||
*/
|
||||
PROJECT(0, 0),
|
||||
/**
|
||||
* <code>MODULE = 1;</code>
|
||||
*/
|
||||
MODULE(1, 1),
|
||||
/**
|
||||
* <code>DIRECTORY = 2;</code>
|
||||
*/
|
||||
DIRECTORY(2, 2),
|
||||
/**
|
||||
* <code>FILE = 3;</code>
|
||||
*/
|
||||
FILE(3, 3),
|
||||
;
|
||||
|
||||
/**
|
||||
* <code>PROJECT = 0;</code>
|
||||
*/
|
||||
public static final int PROJECT_VALUE = 0;
|
||||
/**
|
||||
* <code>MODULE = 1;</code>
|
||||
*/
|
||||
public static final int MODULE_VALUE = 1;
|
||||
/**
|
||||
* <code>DIRECTORY = 2;</code>
|
||||
*/
|
||||
public static final int DIRECTORY_VALUE = 2;
|
||||
/**
|
||||
* <code>FILE = 3;</code>
|
||||
*/
|
||||
public static final int FILE_VALUE = 3;
|
||||
|
||||
|
||||
public final int getNumber() {
|
||||
return value;
|
||||
}
|
||||
|
||||
public static ComponentType valueOf(int value) {
|
||||
switch (value) {
|
||||
case 0: return PROJECT;
|
||||
case 1: return MODULE;
|
||||
case 2: return DIRECTORY;
|
||||
case 3: return FILE;
|
||||
default: return null;
|
||||
}
|
||||
}
|
||||
|
||||
public static com.google.protobuf.Internal.EnumLiteMap<ComponentType>
|
||||
internalGetValueMap() {
|
||||
return internalValueMap;
|
||||
}
|
||||
private static com.google.protobuf.Internal.EnumLiteMap<ComponentType>
|
||||
internalValueMap =
|
||||
new com.google.protobuf.Internal.EnumLiteMap<ComponentType>() {
|
||||
public ComponentType findValueByNumber(int number) {
|
||||
return ComponentType.valueOf(number);
|
||||
}
|
||||
};
|
||||
|
||||
public final com.google.protobuf.Descriptors.EnumValueDescriptor
|
||||
getValueDescriptor() {
|
||||
return getDescriptor().getValues().get(index);
|
||||
}
|
||||
public final com.google.protobuf.Descriptors.EnumDescriptor
|
||||
getDescriptorForType() {
|
||||
return getDescriptor();
|
||||
}
|
||||
public static final com.google.protobuf.Descriptors.EnumDescriptor
|
||||
getDescriptor() {
|
||||
return org.sonar.batch.protocol.Constants.getDescriptor().getEnumTypes().get(1);
|
||||
}
|
||||
|
||||
private static final ComponentType[] VALUES = values();
|
||||
|
||||
public static ComponentType valueOf(
|
||||
com.google.protobuf.Descriptors.EnumValueDescriptor desc) {
|
||||
if (desc.getType() != getDescriptor()) {
|
||||
throw new java.lang.IllegalArgumentException(
|
||||
"EnumValueDescriptor is not for this type.");
|
||||
}
|
||||
return VALUES[desc.getIndex()];
|
||||
}
|
||||
|
||||
private final int index;
|
||||
private final int value;
|
||||
|
||||
private ComponentType(int index, int value) {
|
||||
this.index = index;
|
||||
this.value = value;
|
||||
}
|
||||
|
||||
// @@protoc_insertion_point(enum_scope:ComponentType)
|
||||
}
|
||||
|
||||
/**
|
||||
* Protobuf enum {@code MeasureValueType}
|
||||
*/
|
||||
public enum MeasureValueType
|
||||
implements com.google.protobuf.ProtocolMessageEnum {
|
||||
/**
|
||||
* <code>INT = 0;</code>
|
||||
*/
|
||||
INT(0, 0),
|
||||
/**
|
||||
* <code>LONG = 1;</code>
|
||||
*/
|
||||
LONG(1, 1),
|
||||
/**
|
||||
* <code>DOUBLE = 2;</code>
|
||||
*/
|
||||
DOUBLE(2, 2),
|
||||
/**
|
||||
* <code>BOOLEAN = 3;</code>
|
||||
*/
|
||||
BOOLEAN(3, 3),
|
||||
/**
|
||||
* <code>STRING = 4;</code>
|
||||
*/
|
||||
STRING(4, 4),
|
||||
;
|
||||
|
||||
/**
|
||||
* <code>INT = 0;</code>
|
||||
*/
|
||||
public static final int INT_VALUE = 0;
|
||||
/**
|
||||
* <code>LONG = 1;</code>
|
||||
*/
|
||||
public static final int LONG_VALUE = 1;
|
||||
/**
|
||||
* <code>DOUBLE = 2;</code>
|
||||
*/
|
||||
public static final int DOUBLE_VALUE = 2;
|
||||
/**
|
||||
* <code>BOOLEAN = 3;</code>
|
||||
*/
|
||||
public static final int BOOLEAN_VALUE = 3;
|
||||
/**
|
||||
* <code>STRING = 4;</code>
|
||||
*/
|
||||
public static final int STRING_VALUE = 4;
|
||||
|
||||
|
||||
public final int getNumber() {
|
||||
return value;
|
||||
}
|
||||
|
||||
public static MeasureValueType valueOf(int value) {
|
||||
switch (value) {
|
||||
case 0: return INT;
|
||||
case 1: return LONG;
|
||||
case 2: return DOUBLE;
|
||||
case 3: return BOOLEAN;
|
||||
case 4: return STRING;
|
||||
default: return null;
|
||||
}
|
||||
}
|
||||
|
||||
public static com.google.protobuf.Internal.EnumLiteMap<MeasureValueType>
|
||||
internalGetValueMap() {
|
||||
return internalValueMap;
|
||||
}
|
||||
private static com.google.protobuf.Internal.EnumLiteMap<MeasureValueType>
|
||||
internalValueMap =
|
||||
new com.google.protobuf.Internal.EnumLiteMap<MeasureValueType>() {
|
||||
public MeasureValueType findValueByNumber(int number) {
|
||||
return MeasureValueType.valueOf(number);
|
||||
}
|
||||
};
|
||||
|
||||
public final com.google.protobuf.Descriptors.EnumValueDescriptor
|
||||
getValueDescriptor() {
|
||||
return getDescriptor().getValues().get(index);
|
||||
}
|
||||
public final com.google.protobuf.Descriptors.EnumDescriptor
|
||||
getDescriptorForType() {
|
||||
return getDescriptor();
|
||||
}
|
||||
public static final com.google.protobuf.Descriptors.EnumDescriptor
|
||||
getDescriptor() {
|
||||
return org.sonar.batch.protocol.Constants.getDescriptor().getEnumTypes().get(2);
|
||||
}
|
||||
|
||||
private static final MeasureValueType[] VALUES = values();
|
||||
|
||||
public static MeasureValueType valueOf(
|
||||
com.google.protobuf.Descriptors.EnumValueDescriptor desc) {
|
||||
if (desc.getType() != getDescriptor()) {
|
||||
throw new java.lang.IllegalArgumentException(
|
||||
"EnumValueDescriptor is not for this type.");
|
||||
}
|
||||
return VALUES[desc.getIndex()];
|
||||
}
|
||||
|
||||
private final int index;
|
||||
private final int value;
|
||||
|
||||
private MeasureValueType(int index, int value) {
|
||||
this.index = index;
|
||||
this.value = value;
|
||||
}
|
||||
|
||||
// @@protoc_insertion_point(enum_scope:MeasureValueType)
|
||||
}
|
||||
|
||||
/**
|
||||
* Protobuf enum {@code EventCategory}
|
||||
*
|
||||
* <pre>
|
||||
* temporary enum during development of computation stack
|
||||
* </pre>
|
||||
*/
|
||||
public enum EventCategory
|
||||
implements com.google.protobuf.ProtocolMessageEnum {
|
||||
/**
|
||||
* <code>ALERT = 0;</code>
|
||||
*/
|
||||
ALERT(0, 0),
|
||||
/**
|
||||
* <code>PROFILE = 1;</code>
|
||||
*/
|
||||
PROFILE(1, 1),
|
||||
;
|
||||
|
||||
/**
|
||||
* <code>ALERT = 0;</code>
|
||||
*/
|
||||
public static final int ALERT_VALUE = 0;
|
||||
/**
|
||||
* <code>PROFILE = 1;</code>
|
||||
*/
|
||||
public static final int PROFILE_VALUE = 1;
|
||||
|
||||
|
||||
public final int getNumber() {
|
||||
return value;
|
||||
}
|
||||
|
||||
public static EventCategory valueOf(int value) {
|
||||
switch (value) {
|
||||
case 0: return ALERT;
|
||||
case 1: return PROFILE;
|
||||
default: return null;
|
||||
}
|
||||
}
|
||||
|
||||
public static com.google.protobuf.Internal.EnumLiteMap<EventCategory>
|
||||
internalGetValueMap() {
|
||||
return internalValueMap;
|
||||
}
|
||||
private static com.google.protobuf.Internal.EnumLiteMap<EventCategory>
|
||||
internalValueMap =
|
||||
new com.google.protobuf.Internal.EnumLiteMap<EventCategory>() {
|
||||
public EventCategory findValueByNumber(int number) {
|
||||
return EventCategory.valueOf(number);
|
||||
}
|
||||
};
|
||||
|
||||
public final com.google.protobuf.Descriptors.EnumValueDescriptor
|
||||
getValueDescriptor() {
|
||||
return getDescriptor().getValues().get(index);
|
||||
}
|
||||
public final com.google.protobuf.Descriptors.EnumDescriptor
|
||||
getDescriptorForType() {
|
||||
return getDescriptor();
|
||||
}
|
||||
public static final com.google.protobuf.Descriptors.EnumDescriptor
|
||||
getDescriptor() {
|
||||
return org.sonar.batch.protocol.Constants.getDescriptor().getEnumTypes().get(3);
|
||||
}
|
||||
|
||||
private static final EventCategory[] VALUES = values();
|
||||
|
||||
public static EventCategory valueOf(
|
||||
com.google.protobuf.Descriptors.EnumValueDescriptor desc) {
|
||||
if (desc.getType() != getDescriptor()) {
|
||||
throw new java.lang.IllegalArgumentException(
|
||||
"EnumValueDescriptor is not for this type.");
|
||||
}
|
||||
return VALUES[desc.getIndex()];
|
||||
}
|
||||
|
||||
private final int index;
|
||||
private final int value;
|
||||
|
||||
private EventCategory(int index, int value) {
|
||||
this.index = index;
|
||||
this.value = value;
|
||||
}
|
||||
|
||||
// @@protoc_insertion_point(enum_scope:EventCategory)
|
||||
}
|
||||
|
||||
/**
|
||||
* Protobuf enum {@code ComponentLinkType}
|
||||
*/
|
||||
public enum ComponentLinkType
|
||||
implements com.google.protobuf.ProtocolMessageEnum {
|
||||
/**
|
||||
* <code>HOME = 0;</code>
|
||||
*/
|
||||
HOME(0, 0),
|
||||
/**
|
||||
* <code>SCM = 1;</code>
|
||||
*/
|
||||
SCM(1, 1),
|
||||
/**
|
||||
* <code>SCM_DEV = 2;</code>
|
||||
*/
|
||||
SCM_DEV(2, 2),
|
||||
/**
|
||||
* <code>ISSUE = 3;</code>
|
||||
*/
|
||||
ISSUE(3, 3),
|
||||
/**
|
||||
* <code>CI = 4;</code>
|
||||
*/
|
||||
CI(4, 4),
|
||||
;
|
||||
|
||||
/**
|
||||
* <code>HOME = 0;</code>
|
||||
*/
|
||||
public static final int HOME_VALUE = 0;
|
||||
/**
|
||||
* <code>SCM = 1;</code>
|
||||
*/
|
||||
public static final int SCM_VALUE = 1;
|
||||
/**
|
||||
* <code>SCM_DEV = 2;</code>
|
||||
*/
|
||||
public static final int SCM_DEV_VALUE = 2;
|
||||
/**
|
||||
* <code>ISSUE = 3;</code>
|
||||
*/
|
||||
public static final int ISSUE_VALUE = 3;
|
||||
/**
|
||||
* <code>CI = 4;</code>
|
||||
*/
|
||||
public static final int CI_VALUE = 4;
|
||||
|
||||
|
||||
public final int getNumber() {
|
||||
return value;
|
||||
}
|
||||
|
||||
public static ComponentLinkType valueOf(int value) {
|
||||
switch (value) {
|
||||
case 0: return HOME;
|
||||
case 1: return SCM;
|
||||
case 2: return SCM_DEV;
|
||||
case 3: return ISSUE;
|
||||
case 4: return CI;
|
||||
default: return null;
|
||||
}
|
||||
}
|
||||
|
||||
public static com.google.protobuf.Internal.EnumLiteMap<ComponentLinkType>
|
||||
internalGetValueMap() {
|
||||
return internalValueMap;
|
||||
}
|
||||
private static com.google.protobuf.Internal.EnumLiteMap<ComponentLinkType>
|
||||
internalValueMap =
|
||||
new com.google.protobuf.Internal.EnumLiteMap<ComponentLinkType>() {
|
||||
public ComponentLinkType findValueByNumber(int number) {
|
||||
return ComponentLinkType.valueOf(number);
|
||||
}
|
||||
};
|
||||
|
||||
public final com.google.protobuf.Descriptors.EnumValueDescriptor
|
||||
getValueDescriptor() {
|
||||
return getDescriptor().getValues().get(index);
|
||||
}
|
||||
public final com.google.protobuf.Descriptors.EnumDescriptor
|
||||
getDescriptorForType() {
|
||||
return getDescriptor();
|
||||
}
|
||||
public static final com.google.protobuf.Descriptors.EnumDescriptor
|
||||
getDescriptor() {
|
||||
return org.sonar.batch.protocol.Constants.getDescriptor().getEnumTypes().get(4);
|
||||
}
|
||||
|
||||
private static final ComponentLinkType[] VALUES = values();
|
||||
|
||||
public static ComponentLinkType valueOf(
|
||||
com.google.protobuf.Descriptors.EnumValueDescriptor desc) {
|
||||
if (desc.getType() != getDescriptor()) {
|
||||
throw new java.lang.IllegalArgumentException(
|
||||
"EnumValueDescriptor is not for this type.");
|
||||
}
|
||||
return VALUES[desc.getIndex()];
|
||||
}
|
||||
|
||||
private final int index;
|
||||
private final int value;
|
||||
|
||||
private ComponentLinkType(int index, int value) {
|
||||
this.index = index;
|
||||
this.value = value;
|
||||
}
|
||||
|
||||
// @@protoc_insertion_point(enum_scope:ComponentLinkType)
|
||||
}
|
||||
|
||||
/**
|
||||
* Protobuf enum {@code HighlightingType}
|
||||
*/
|
||||
public enum HighlightingType
|
||||
implements com.google.protobuf.ProtocolMessageEnum {
|
||||
/**
|
||||
* <code>ANNOTATION = 0;</code>
|
||||
*/
|
||||
ANNOTATION(0, 0),
|
||||
/**
|
||||
* <code>CONSTANT = 1;</code>
|
||||
*/
|
||||
CONSTANT(1, 1),
|
||||
/**
|
||||
* <code>COMMENT = 2;</code>
|
||||
*/
|
||||
COMMENT(2, 2),
|
||||
/**
|
||||
* <code>CPP_DOC = 3;</code>
|
||||
*/
|
||||
CPP_DOC(3, 3),
|
||||
/**
|
||||
* <code>STRUCTURED_COMMENT = 4;</code>
|
||||
*/
|
||||
STRUCTURED_COMMENT(4, 4),
|
||||
/**
|
||||
* <code>KEYWORD = 5;</code>
|
||||
*/
|
||||
KEYWORD(5, 5),
|
||||
/**
|
||||
* <code>HIGHLIGHTING_STRING = 6;</code>
|
||||
*/
|
||||
HIGHLIGHTING_STRING(6, 6),
|
||||
/**
|
||||
* <code>KEYWORD_LIGHT = 7;</code>
|
||||
*/
|
||||
KEYWORD_LIGHT(7, 7),
|
||||
/**
|
||||
* <code>PREPROCESS_DIRECTIVE = 8;</code>
|
||||
*/
|
||||
PREPROCESS_DIRECTIVE(8, 8),
|
||||
;
|
||||
|
||||
/**
|
||||
* <code>ANNOTATION = 0;</code>
|
||||
*/
|
||||
public static final int ANNOTATION_VALUE = 0;
|
||||
/**
|
||||
* <code>CONSTANT = 1;</code>
|
||||
*/
|
||||
public static final int CONSTANT_VALUE = 1;
|
||||
/**
|
||||
* <code>COMMENT = 2;</code>
|
||||
*/
|
||||
public static final int COMMENT_VALUE = 2;
|
||||
/**
|
||||
* <code>CPP_DOC = 3;</code>
|
||||
*/
|
||||
public static final int CPP_DOC_VALUE = 3;
|
||||
/**
|
||||
* <code>STRUCTURED_COMMENT = 4;</code>
|
||||
*/
|
||||
public static final int STRUCTURED_COMMENT_VALUE = 4;
|
||||
/**
|
||||
* <code>KEYWORD = 5;</code>
|
||||
*/
|
||||
public static final int KEYWORD_VALUE = 5;
|
||||
/**
|
||||
* <code>HIGHLIGHTING_STRING = 6;</code>
|
||||
*/
|
||||
public static final int HIGHLIGHTING_STRING_VALUE = 6;
|
||||
/**
|
||||
* <code>KEYWORD_LIGHT = 7;</code>
|
||||
*/
|
||||
public static final int KEYWORD_LIGHT_VALUE = 7;
|
||||
/**
|
||||
* <code>PREPROCESS_DIRECTIVE = 8;</code>
|
||||
*/
|
||||
public static final int PREPROCESS_DIRECTIVE_VALUE = 8;
|
||||
|
||||
|
||||
public final int getNumber() {
|
||||
return value;
|
||||
}
|
||||
|
||||
public static HighlightingType valueOf(int value) {
|
||||
switch (value) {
|
||||
case 0: return ANNOTATION;
|
||||
case 1: return CONSTANT;
|
||||
case 2: return COMMENT;
|
||||
case 3: return CPP_DOC;
|
||||
case 4: return STRUCTURED_COMMENT;
|
||||
case 5: return KEYWORD;
|
||||
case 6: return HIGHLIGHTING_STRING;
|
||||
case 7: return KEYWORD_LIGHT;
|
||||
case 8: return PREPROCESS_DIRECTIVE;
|
||||
default: return null;
|
||||
}
|
||||
}
|
||||
|
||||
public static com.google.protobuf.Internal.EnumLiteMap<HighlightingType>
|
||||
internalGetValueMap() {
|
||||
return internalValueMap;
|
||||
}
|
||||
private static com.google.protobuf.Internal.EnumLiteMap<HighlightingType>
|
||||
internalValueMap =
|
||||
new com.google.protobuf.Internal.EnumLiteMap<HighlightingType>() {
|
||||
public HighlightingType findValueByNumber(int number) {
|
||||
return HighlightingType.valueOf(number);
|
||||
}
|
||||
};
|
||||
|
||||
public final com.google.protobuf.Descriptors.EnumValueDescriptor
|
||||
getValueDescriptor() {
|
||||
return getDescriptor().getValues().get(index);
|
||||
}
|
||||
public final com.google.protobuf.Descriptors.EnumDescriptor
|
||||
getDescriptorForType() {
|
||||
return getDescriptor();
|
||||
}
|
||||
public static final com.google.protobuf.Descriptors.EnumDescriptor
|
||||
getDescriptor() {
|
||||
return org.sonar.batch.protocol.Constants.getDescriptor().getEnumTypes().get(5);
|
||||
}
|
||||
|
||||
private static final HighlightingType[] VALUES = values();
|
||||
|
||||
public static HighlightingType valueOf(
|
||||
com.google.protobuf.Descriptors.EnumValueDescriptor desc) {
|
||||
if (desc.getType() != getDescriptor()) {
|
||||
throw new java.lang.IllegalArgumentException(
|
||||
"EnumValueDescriptor is not for this type.");
|
||||
}
|
||||
return VALUES[desc.getIndex()];
|
||||
}
|
||||
|
||||
private final int index;
|
||||
private final int value;
|
||||
|
||||
private HighlightingType(int index, int value) {
|
||||
this.index = index;
|
||||
this.value = value;
|
||||
}
|
||||
|
||||
// @@protoc_insertion_point(enum_scope:HighlightingType)
|
||||
}
|
||||
|
||||
/**
|
||||
* Protobuf enum {@code TestStatus}
|
||||
*/
|
||||
public enum TestStatus
|
||||
implements com.google.protobuf.ProtocolMessageEnum {
|
||||
/**
|
||||
* <code>OK = 1;</code>
|
||||
*/
|
||||
OK(0, 1),
|
||||
/**
|
||||
* <code>FAILURE = 2;</code>
|
||||
*/
|
||||
FAILURE(1, 2),
|
||||
/**
|
||||
* <code>ERROR = 3;</code>
|
||||
*/
|
||||
ERROR(2, 3),
|
||||
/**
|
||||
* <code>SKIPPED = 4;</code>
|
||||
*/
|
||||
SKIPPED(3, 4),
|
||||
;
|
||||
|
||||
/**
|
||||
* <code>OK = 1;</code>
|
||||
*/
|
||||
public static final int OK_VALUE = 1;
|
||||
/**
|
||||
* <code>FAILURE = 2;</code>
|
||||
*/
|
||||
public static final int FAILURE_VALUE = 2;
|
||||
/**
|
||||
* <code>ERROR = 3;</code>
|
||||
*/
|
||||
public static final int ERROR_VALUE = 3;
|
||||
/**
|
||||
* <code>SKIPPED = 4;</code>
|
||||
*/
|
||||
public static final int SKIPPED_VALUE = 4;
|
||||
|
||||
|
||||
public final int getNumber() {
|
||||
return value;
|
||||
}
|
||||
|
||||
public static TestStatus valueOf(int value) {
|
||||
switch (value) {
|
||||
case 1: return OK;
|
||||
case 2: return FAILURE;
|
||||
case 3: return ERROR;
|
||||
case 4: return SKIPPED;
|
||||
default: return null;
|
||||
}
|
||||
}
|
||||
|
||||
public static com.google.protobuf.Internal.EnumLiteMap<TestStatus>
|
||||
internalGetValueMap() {
|
||||
return internalValueMap;
|
||||
}
|
||||
private static com.google.protobuf.Internal.EnumLiteMap<TestStatus>
|
||||
internalValueMap =
|
||||
new com.google.protobuf.Internal.EnumLiteMap<TestStatus>() {
|
||||
public TestStatus findValueByNumber(int number) {
|
||||
return TestStatus.valueOf(number);
|
||||
}
|
||||
};
|
||||
|
||||
public final com.google.protobuf.Descriptors.EnumValueDescriptor
|
||||
getValueDescriptor() {
|
||||
return getDescriptor().getValues().get(index);
|
||||
}
|
||||
public final com.google.protobuf.Descriptors.EnumDescriptor
|
||||
getDescriptorForType() {
|
||||
return getDescriptor();
|
||||
}
|
||||
public static final com.google.protobuf.Descriptors.EnumDescriptor
|
||||
getDescriptor() {
|
||||
return org.sonar.batch.protocol.Constants.getDescriptor().getEnumTypes().get(6);
|
||||
}
|
||||
|
||||
private static final TestStatus[] VALUES = values();
|
||||
|
||||
public static TestStatus valueOf(
|
||||
com.google.protobuf.Descriptors.EnumValueDescriptor desc) {
|
||||
if (desc.getType() != getDescriptor()) {
|
||||
throw new java.lang.IllegalArgumentException(
|
||||
"EnumValueDescriptor is not for this type.");
|
||||
}
|
||||
return VALUES[desc.getIndex()];
|
||||
}
|
||||
|
||||
private final int index;
|
||||
private final int value;
|
||||
|
||||
private TestStatus(int index, int value) {
|
||||
this.index = index;
|
||||
this.value = value;
|
||||
}
|
||||
|
||||
// @@protoc_insertion_point(enum_scope:TestStatus)
|
||||
}
|
||||
|
||||
|
||||
public static com.google.protobuf.Descriptors.FileDescriptor
|
||||
getDescriptor() {
|
||||
return descriptor;
|
||||
}
|
||||
private static com.google.protobuf.Descriptors.FileDescriptor
|
||||
descriptor;
|
||||
static {
|
||||
java.lang.String[] descriptorData = {
|
||||
"\n\017constants.proto*E\n\010Severity\022\010\n\004INFO\020\000\022" +
|
||||
"\t\n\005MINOR\020\001\022\t\n\005MAJOR\020\002\022\014\n\010CRITICAL\020\003\022\013\n\007B" +
|
||||
"LOCKER\020\004*A\n\rComponentType\022\013\n\007PROJECT\020\000\022\n" +
|
||||
"\n\006MODULE\020\001\022\r\n\tDIRECTORY\020\002\022\010\n\004FILE\020\003*J\n\020M" +
|
||||
"easureValueType\022\007\n\003INT\020\000\022\010\n\004LONG\020\001\022\n\n\006DO" +
|
||||
"UBLE\020\002\022\013\n\007BOOLEAN\020\003\022\n\n\006STRING\020\004*\'\n\rEvent" +
|
||||
"Category\022\t\n\005ALERT\020\000\022\013\n\007PROFILE\020\001*F\n\021Comp" +
|
||||
"onentLinkType\022\010\n\004HOME\020\000\022\007\n\003SCM\020\001\022\013\n\007SCM_" +
|
||||
"DEV\020\002\022\t\n\005ISSUE\020\003\022\006\n\002CI\020\004*\265\001\n\020Highlightin" +
|
||||
"gType\022\016\n\nANNOTATION\020\000\022\014\n\010CONSTANT\020\001\022\013\n\007C",
|
||||
"OMMENT\020\002\022\013\n\007CPP_DOC\020\003\022\026\n\022STRUCTURED_COMM" +
|
||||
"ENT\020\004\022\013\n\007KEYWORD\020\005\022\027\n\023HIGHLIGHTING_STRIN" +
|
||||
"G\020\006\022\021\n\rKEYWORD_LIGHT\020\007\022\030\n\024PREPROCESS_DIR" +
|
||||
"ECTIVE\020\010*9\n\nTestStatus\022\006\n\002OK\020\001\022\013\n\007FAILUR" +
|
||||
"E\020\002\022\t\n\005ERROR\020\003\022\013\n\007SKIPPED\020\004B\034\n\030org.sonar" +
|
||||
".batch.protocolH\001"
|
||||
};
|
||||
com.google.protobuf.Descriptors.FileDescriptor.InternalDescriptorAssigner assigner =
|
||||
new com.google.protobuf.Descriptors.FileDescriptor. InternalDescriptorAssigner() {
|
||||
public com.google.protobuf.ExtensionRegistry assignDescriptors(
|
||||
com.google.protobuf.Descriptors.FileDescriptor root) {
|
||||
descriptor = root;
|
||||
return null;
|
||||
}
|
||||
};
|
||||
com.google.protobuf.Descriptors.FileDescriptor
|
||||
.internalBuildGeneratedFileFrom(descriptorData,
|
||||
new com.google.protobuf.Descriptors.FileDescriptor[] {
|
||||
}, assigner);
|
||||
}
|
||||
|
||||
// @@protoc_insertion_point(outer_class_scope)
|
||||
}
|
檔案差異因為檔案過大而無法顯示
載入差異
檔案差異因為檔案過大而無法顯示
載入差異
@ -24,10 +24,6 @@ Notes
|
||||
|
||||
- this is beta version of specification. It will evolve during next releases and is
|
||||
not forward-compatible yet.
|
||||
|
||||
- the related Java files are not generated during build. Indeed the existing protoc maven
|
||||
plugins require protobuf to be installed on boxes. That means that generated Java files
|
||||
are updated and committed for each change (see src/main/gen-java).
|
||||
*/
|
||||
|
||||
syntax = "proto2";
|
||||
|
@ -24,10 +24,6 @@ Notes
|
||||
|
||||
- this is beta version of specification. It will evolve during next releases and is
|
||||
not forward-compatible yet.
|
||||
|
||||
- the related Java files are not generated during build. Indeed the existing protoc maven
|
||||
plugins require protobuf to be installed on boxes. That means that generated Java files
|
||||
are updated and committed for each change (see src/main/gen-java).
|
||||
*/
|
||||
|
||||
syntax = "proto2";
|
||||
|
@ -101,25 +101,6 @@
|
||||
|
||||
<build>
|
||||
<plugins>
|
||||
<plugin>
|
||||
<groupId>org.codehaus.mojo</groupId>
|
||||
<artifactId>build-helper-maven-plugin</artifactId>
|
||||
<executions>
|
||||
<execution>
|
||||
<id>add-test-source</id>
|
||||
<phase>generate-test-sources</phase>
|
||||
<goals>
|
||||
<goal>add-test-source</goal>
|
||||
</goals>
|
||||
<configuration>
|
||||
<sources>
|
||||
<source>src/test/gen-java</source>
|
||||
</sources>
|
||||
</configuration>
|
||||
</execution>
|
||||
</executions>
|
||||
</plugin>
|
||||
|
||||
<plugin>
|
||||
<groupId>org.apache.maven.plugins</groupId>
|
||||
<artifactId>maven-dependency-plugin</artifactId>
|
||||
|
檔案差異因為檔案過大而無法顯示
載入差異
@ -13,10 +13,6 @@
|
||||
<name>SonarQube :: Database</name>
|
||||
<description>Create and request SonarQube schema</description>
|
||||
|
||||
<properties>
|
||||
<sonar.exclusions>src/main/gen-java/**/*</sonar.exclusions>
|
||||
</properties>
|
||||
|
||||
<dependencies>
|
||||
<dependency>
|
||||
<groupId>com.google.code.findbugs</groupId>
|
||||
@ -121,24 +117,6 @@
|
||||
|
||||
<build>
|
||||
<plugins>
|
||||
<plugin>
|
||||
<groupId>org.codehaus.mojo</groupId>
|
||||
<artifactId>build-helper-maven-plugin</artifactId>
|
||||
<executions>
|
||||
<execution>
|
||||
<id>add-source</id>
|
||||
<phase>generate-sources</phase>
|
||||
<goals>
|
||||
<goal>add-source</goal>
|
||||
</goals>
|
||||
<configuration>
|
||||
<sources>
|
||||
<source>src/main/gen-java</source>
|
||||
</sources>
|
||||
</configuration>
|
||||
</execution>
|
||||
</executions>
|
||||
</plugin>
|
||||
<plugin>
|
||||
<groupId>org.apache.maven.plugins</groupId>
|
||||
<artifactId>maven-surefire-plugin</artifactId>
|
||||
|
@ -1,814 +0,0 @@
|
||||
// Generated by the protocol buffer compiler. DO NOT EDIT!
|
||||
// source: db-commons.proto
|
||||
|
||||
package org.sonar.db.protobuf;
|
||||
|
||||
public final class DbCommons {
|
||||
private DbCommons() {}
|
||||
public static void registerAllExtensions(
|
||||
com.google.protobuf.ExtensionRegistry registry) {
|
||||
}
|
||||
public interface TextRangeOrBuilder extends
|
||||
// @@protoc_insertion_point(interface_extends:sonarqube.db.commons.TextRange)
|
||||
com.google.protobuf.MessageOrBuilder {
|
||||
|
||||
/**
|
||||
* <code>optional int32 start_line = 1;</code>
|
||||
*
|
||||
* <pre>
|
||||
* Start line. Should never be absent
|
||||
* </pre>
|
||||
*/
|
||||
boolean hasStartLine();
|
||||
/**
|
||||
* <code>optional int32 start_line = 1;</code>
|
||||
*
|
||||
* <pre>
|
||||
* Start line. Should never be absent
|
||||
* </pre>
|
||||
*/
|
||||
int getStartLine();
|
||||
|
||||
/**
|
||||
* <code>optional int32 end_line = 2;</code>
|
||||
*
|
||||
* <pre>
|
||||
* End line (inclusive). Absent means it is same as start line
|
||||
* </pre>
|
||||
*/
|
||||
boolean hasEndLine();
|
||||
/**
|
||||
* <code>optional int32 end_line = 2;</code>
|
||||
*
|
||||
* <pre>
|
||||
* End line (inclusive). Absent means it is same as start line
|
||||
* </pre>
|
||||
*/
|
||||
int getEndLine();
|
||||
|
||||
/**
|
||||
* <code>optional int32 start_offset = 3;</code>
|
||||
*
|
||||
* <pre>
|
||||
* If absent it means range starts at the first offset of start line
|
||||
* </pre>
|
||||
*/
|
||||
boolean hasStartOffset();
|
||||
/**
|
||||
* <code>optional int32 start_offset = 3;</code>
|
||||
*
|
||||
* <pre>
|
||||
* If absent it means range starts at the first offset of start line
|
||||
* </pre>
|
||||
*/
|
||||
int getStartOffset();
|
||||
|
||||
/**
|
||||
* <code>optional int32 end_offset = 4;</code>
|
||||
*
|
||||
* <pre>
|
||||
* If absent it means range ends at the last offset of end line
|
||||
* </pre>
|
||||
*/
|
||||
boolean hasEndOffset();
|
||||
/**
|
||||
* <code>optional int32 end_offset = 4;</code>
|
||||
*
|
||||
* <pre>
|
||||
* If absent it means range ends at the last offset of end line
|
||||
* </pre>
|
||||
*/
|
||||
int getEndOffset();
|
||||
}
|
||||
/**
|
||||
* Protobuf type {@code sonarqube.db.commons.TextRange}
|
||||
*
|
||||
* <pre>
|
||||
* Lines start at 1 and line offsets start at 0
|
||||
* </pre>
|
||||
*/
|
||||
public static final class TextRange extends
|
||||
com.google.protobuf.GeneratedMessage implements
|
||||
// @@protoc_insertion_point(message_implements:sonarqube.db.commons.TextRange)
|
||||
TextRangeOrBuilder {
|
||||
// Use TextRange.newBuilder() to construct.
|
||||
private TextRange(com.google.protobuf.GeneratedMessage.Builder builder) {
|
||||
super(builder);
|
||||
}
|
||||
private TextRange() {
|
||||
startLine_ = 0;
|
||||
endLine_ = 0;
|
||||
startOffset_ = 0;
|
||||
endOffset_ = 0;
|
||||
}
|
||||
|
||||
@java.lang.Override
|
||||
public final com.google.protobuf.UnknownFieldSet
|
||||
getUnknownFields() {
|
||||
return this.unknownFields;
|
||||
}
|
||||
private TextRange(
|
||||
com.google.protobuf.CodedInputStream input,
|
||||
com.google.protobuf.ExtensionRegistryLite extensionRegistry) {
|
||||
this();
|
||||
int mutable_bitField0_ = 0;
|
||||
com.google.protobuf.UnknownFieldSet.Builder unknownFields =
|
||||
com.google.protobuf.UnknownFieldSet.newBuilder();
|
||||
try {
|
||||
boolean done = false;
|
||||
while (!done) {
|
||||
int tag = input.readTag();
|
||||
switch (tag) {
|
||||
case 0:
|
||||
done = true;
|
||||
break;
|
||||
default: {
|
||||
if (!parseUnknownField(input, unknownFields,
|
||||
extensionRegistry, tag)) {
|
||||
done = true;
|
||||
}
|
||||
break;
|
||||
}
|
||||
case 8: {
|
||||
bitField0_ |= 0x00000001;
|
||||
startLine_ = input.readInt32();
|
||||
break;
|
||||
}
|
||||
case 16: {
|
||||
bitField0_ |= 0x00000002;
|
||||
endLine_ = input.readInt32();
|
||||
break;
|
||||
}
|
||||
case 24: {
|
||||
bitField0_ |= 0x00000004;
|
||||
startOffset_ = input.readInt32();
|
||||
break;
|
||||
}
|
||||
case 32: {
|
||||
bitField0_ |= 0x00000008;
|
||||
endOffset_ = input.readInt32();
|
||||
break;
|
||||
}
|
||||
}
|
||||
}
|
||||
} catch (com.google.protobuf.InvalidProtocolBufferException e) {
|
||||
throw new RuntimeException(e.setUnfinishedMessage(this));
|
||||
} catch (java.io.IOException e) {
|
||||
throw new RuntimeException(
|
||||
new com.google.protobuf.InvalidProtocolBufferException(
|
||||
e.getMessage()).setUnfinishedMessage(this));
|
||||
} finally {
|
||||
this.unknownFields = unknownFields.build();
|
||||
makeExtensionsImmutable();
|
||||
}
|
||||
}
|
||||
public static final com.google.protobuf.Descriptors.Descriptor
|
||||
getDescriptor() {
|
||||
return org.sonar.db.protobuf.DbCommons.internal_static_sonarqube_db_commons_TextRange_descriptor;
|
||||
}
|
||||
|
||||
protected com.google.protobuf.GeneratedMessage.FieldAccessorTable
|
||||
internalGetFieldAccessorTable() {
|
||||
return org.sonar.db.protobuf.DbCommons.internal_static_sonarqube_db_commons_TextRange_fieldAccessorTable
|
||||
.ensureFieldAccessorsInitialized(
|
||||
org.sonar.db.protobuf.DbCommons.TextRange.class, org.sonar.db.protobuf.DbCommons.TextRange.Builder.class);
|
||||
}
|
||||
|
||||
private int bitField0_;
|
||||
public static final int START_LINE_FIELD_NUMBER = 1;
|
||||
private int startLine_;
|
||||
/**
|
||||
* <code>optional int32 start_line = 1;</code>
|
||||
*
|
||||
* <pre>
|
||||
* Start line. Should never be absent
|
||||
* </pre>
|
||||
*/
|
||||
public boolean hasStartLine() {
|
||||
return ((bitField0_ & 0x00000001) == 0x00000001);
|
||||
}
|
||||
/**
|
||||
* <code>optional int32 start_line = 1;</code>
|
||||
*
|
||||
* <pre>
|
||||
* Start line. Should never be absent
|
||||
* </pre>
|
||||
*/
|
||||
public int getStartLine() {
|
||||
return startLine_;
|
||||
}
|
||||
|
||||
public static final int END_LINE_FIELD_NUMBER = 2;
|
||||
private int endLine_;
|
||||
/**
|
||||
* <code>optional int32 end_line = 2;</code>
|
||||
*
|
||||
* <pre>
|
||||
* End line (inclusive). Absent means it is same as start line
|
||||
* </pre>
|
||||
*/
|
||||
public boolean hasEndLine() {
|
||||
return ((bitField0_ & 0x00000002) == 0x00000002);
|
||||
}
|
||||
/**
|
||||
* <code>optional int32 end_line = 2;</code>
|
||||
*
|
||||
* <pre>
|
||||
* End line (inclusive). Absent means it is same as start line
|
||||
* </pre>
|
||||
*/
|
||||
public int getEndLine() {
|
||||
return endLine_;
|
||||
}
|
||||
|
||||
public static final int START_OFFSET_FIELD_NUMBER = 3;
|
||||
private int startOffset_;
|
||||
/**
|
||||
* <code>optional int32 start_offset = 3;</code>
|
||||
*
|
||||
* <pre>
|
||||
* If absent it means range starts at the first offset of start line
|
||||
* </pre>
|
||||
*/
|
||||
public boolean hasStartOffset() {
|
||||
return ((bitField0_ & 0x00000004) == 0x00000004);
|
||||
}
|
||||
/**
|
||||
* <code>optional int32 start_offset = 3;</code>
|
||||
*
|
||||
* <pre>
|
||||
* If absent it means range starts at the first offset of start line
|
||||
* </pre>
|
||||
*/
|
||||
public int getStartOffset() {
|
||||
return startOffset_;
|
||||
}
|
||||
|
||||
public static final int END_OFFSET_FIELD_NUMBER = 4;
|
||||
private int endOffset_;
|
||||
/**
|
||||
* <code>optional int32 end_offset = 4;</code>
|
||||
*
|
||||
* <pre>
|
||||
* If absent it means range ends at the last offset of end line
|
||||
* </pre>
|
||||
*/
|
||||
public boolean hasEndOffset() {
|
||||
return ((bitField0_ & 0x00000008) == 0x00000008);
|
||||
}
|
||||
/**
|
||||
* <code>optional int32 end_offset = 4;</code>
|
||||
*
|
||||
* <pre>
|
||||
* If absent it means range ends at the last offset of end line
|
||||
* </pre>
|
||||
*/
|
||||
public int getEndOffset() {
|
||||
return endOffset_;
|
||||
}
|
||||
|
||||
private byte memoizedIsInitialized = -1;
|
||||
public final boolean isInitialized() {
|
||||
byte isInitialized = memoizedIsInitialized;
|
||||
if (isInitialized == 1) return true;
|
||||
if (isInitialized == 0) return false;
|
||||
|
||||
memoizedIsInitialized = 1;
|
||||
return true;
|
||||
}
|
||||
|
||||
public void writeTo(com.google.protobuf.CodedOutputStream output)
|
||||
throws java.io.IOException {
|
||||
if (((bitField0_ & 0x00000001) == 0x00000001)) {
|
||||
output.writeInt32(1, startLine_);
|
||||
}
|
||||
if (((bitField0_ & 0x00000002) == 0x00000002)) {
|
||||
output.writeInt32(2, endLine_);
|
||||
}
|
||||
if (((bitField0_ & 0x00000004) == 0x00000004)) {
|
||||
output.writeInt32(3, startOffset_);
|
||||
}
|
||||
if (((bitField0_ & 0x00000008) == 0x00000008)) {
|
||||
output.writeInt32(4, endOffset_);
|
||||
}
|
||||
unknownFields.writeTo(output);
|
||||
}
|
||||
|
||||
private int memoizedSerializedSize = -1;
|
||||
public int getSerializedSize() {
|
||||
int size = memoizedSerializedSize;
|
||||
if (size != -1) return size;
|
||||
|
||||
size = 0;
|
||||
if (((bitField0_ & 0x00000001) == 0x00000001)) {
|
||||
size += com.google.protobuf.CodedOutputStream
|
||||
.computeInt32Size(1, startLine_);
|
||||
}
|
||||
if (((bitField0_ & 0x00000002) == 0x00000002)) {
|
||||
size += com.google.protobuf.CodedOutputStream
|
||||
.computeInt32Size(2, endLine_);
|
||||
}
|
||||
if (((bitField0_ & 0x00000004) == 0x00000004)) {
|
||||
size += com.google.protobuf.CodedOutputStream
|
||||
.computeInt32Size(3, startOffset_);
|
||||
}
|
||||
if (((bitField0_ & 0x00000008) == 0x00000008)) {
|
||||
size += com.google.protobuf.CodedOutputStream
|
||||
.computeInt32Size(4, endOffset_);
|
||||
}
|
||||
size += unknownFields.getSerializedSize();
|
||||
memoizedSerializedSize = size;
|
||||
return size;
|
||||
}
|
||||
|
||||
private static final long serialVersionUID = 0L;
|
||||
public static org.sonar.db.protobuf.DbCommons.TextRange parseFrom(
|
||||
com.google.protobuf.ByteString data)
|
||||
throws com.google.protobuf.InvalidProtocolBufferException {
|
||||
return PARSER.parseFrom(data);
|
||||
}
|
||||
public static org.sonar.db.protobuf.DbCommons.TextRange parseFrom(
|
||||
com.google.protobuf.ByteString data,
|
||||
com.google.protobuf.ExtensionRegistryLite extensionRegistry)
|
||||
throws com.google.protobuf.InvalidProtocolBufferException {
|
||||
return PARSER.parseFrom(data, extensionRegistry);
|
||||
}
|
||||
public static org.sonar.db.protobuf.DbCommons.TextRange parseFrom(byte[] data)
|
||||
throws com.google.protobuf.InvalidProtocolBufferException {
|
||||
return PARSER.parseFrom(data);
|
||||
}
|
||||
public static org.sonar.db.protobuf.DbCommons.TextRange parseFrom(
|
||||
byte[] data,
|
||||
com.google.protobuf.ExtensionRegistryLite extensionRegistry)
|
||||
throws com.google.protobuf.InvalidProtocolBufferException {
|
||||
return PARSER.parseFrom(data, extensionRegistry);
|
||||
}
|
||||
public static org.sonar.db.protobuf.DbCommons.TextRange parseFrom(java.io.InputStream input)
|
||||
throws java.io.IOException {
|
||||
return PARSER.parseFrom(input);
|
||||
}
|
||||
public static org.sonar.db.protobuf.DbCommons.TextRange parseFrom(
|
||||
java.io.InputStream input,
|
||||
com.google.protobuf.ExtensionRegistryLite extensionRegistry)
|
||||
throws java.io.IOException {
|
||||
return PARSER.parseFrom(input, extensionRegistry);
|
||||
}
|
||||
public static org.sonar.db.protobuf.DbCommons.TextRange parseDelimitedFrom(java.io.InputStream input)
|
||||
throws java.io.IOException {
|
||||
return PARSER.parseDelimitedFrom(input);
|
||||
}
|
||||
public static org.sonar.db.protobuf.DbCommons.TextRange parseDelimitedFrom(
|
||||
java.io.InputStream input,
|
||||
com.google.protobuf.ExtensionRegistryLite extensionRegistry)
|
||||
throws java.io.IOException {
|
||||
return PARSER.parseDelimitedFrom(input, extensionRegistry);
|
||||
}
|
||||
public static org.sonar.db.protobuf.DbCommons.TextRange parseFrom(
|
||||
com.google.protobuf.CodedInputStream input)
|
||||
throws java.io.IOException {
|
||||
return PARSER.parseFrom(input);
|
||||
}
|
||||
public static org.sonar.db.protobuf.DbCommons.TextRange parseFrom(
|
||||
com.google.protobuf.CodedInputStream input,
|
||||
com.google.protobuf.ExtensionRegistryLite extensionRegistry)
|
||||
throws java.io.IOException {
|
||||
return PARSER.parseFrom(input, extensionRegistry);
|
||||
}
|
||||
|
||||
public Builder newBuilderForType() { return newBuilder(); }
|
||||
public static Builder newBuilder() {
|
||||
return DEFAULT_INSTANCE.toBuilder();
|
||||
}
|
||||
public static Builder newBuilder(org.sonar.db.protobuf.DbCommons.TextRange prototype) {
|
||||
return DEFAULT_INSTANCE.toBuilder().mergeFrom(prototype);
|
||||
}
|
||||
public Builder toBuilder() {
|
||||
return this == DEFAULT_INSTANCE
|
||||
? new Builder() : new Builder().mergeFrom(this);
|
||||
}
|
||||
|
||||
@java.lang.Override
|
||||
protected Builder newBuilderForType(
|
||||
com.google.protobuf.GeneratedMessage.BuilderParent parent) {
|
||||
Builder builder = new Builder(parent);
|
||||
return builder;
|
||||
}
|
||||
/**
|
||||
* Protobuf type {@code sonarqube.db.commons.TextRange}
|
||||
*
|
||||
* <pre>
|
||||
* Lines start at 1 and line offsets start at 0
|
||||
* </pre>
|
||||
*/
|
||||
public static final class Builder extends
|
||||
com.google.protobuf.GeneratedMessage.Builder<Builder> implements
|
||||
// @@protoc_insertion_point(builder_implements:sonarqube.db.commons.TextRange)
|
||||
org.sonar.db.protobuf.DbCommons.TextRangeOrBuilder {
|
||||
public static final com.google.protobuf.Descriptors.Descriptor
|
||||
getDescriptor() {
|
||||
return org.sonar.db.protobuf.DbCommons.internal_static_sonarqube_db_commons_TextRange_descriptor;
|
||||
}
|
||||
|
||||
protected com.google.protobuf.GeneratedMessage.FieldAccessorTable
|
||||
internalGetFieldAccessorTable() {
|
||||
return org.sonar.db.protobuf.DbCommons.internal_static_sonarqube_db_commons_TextRange_fieldAccessorTable
|
||||
.ensureFieldAccessorsInitialized(
|
||||
org.sonar.db.protobuf.DbCommons.TextRange.class, org.sonar.db.protobuf.DbCommons.TextRange.Builder.class);
|
||||
}
|
||||
|
||||
// Construct using org.sonar.db.protobuf.DbCommons.TextRange.newBuilder()
|
||||
private Builder() {
|
||||
maybeForceBuilderInitialization();
|
||||
}
|
||||
|
||||
private Builder(
|
||||
com.google.protobuf.GeneratedMessage.BuilderParent parent) {
|
||||
super(parent);
|
||||
maybeForceBuilderInitialization();
|
||||
}
|
||||
private void maybeForceBuilderInitialization() {
|
||||
if (com.google.protobuf.GeneratedMessage.alwaysUseFieldBuilders) {
|
||||
}
|
||||
}
|
||||
public Builder clear() {
|
||||
super.clear();
|
||||
startLine_ = 0;
|
||||
bitField0_ = (bitField0_ & ~0x00000001);
|
||||
endLine_ = 0;
|
||||
bitField0_ = (bitField0_ & ~0x00000002);
|
||||
startOffset_ = 0;
|
||||
bitField0_ = (bitField0_ & ~0x00000004);
|
||||
endOffset_ = 0;
|
||||
bitField0_ = (bitField0_ & ~0x00000008);
|
||||
return this;
|
||||
}
|
||||
|
||||
public com.google.protobuf.Descriptors.Descriptor
|
||||
getDescriptorForType() {
|
||||
return org.sonar.db.protobuf.DbCommons.internal_static_sonarqube_db_commons_TextRange_descriptor;
|
||||
}
|
||||
|
||||
public org.sonar.db.protobuf.DbCommons.TextRange getDefaultInstanceForType() {
|
||||
return org.sonar.db.protobuf.DbCommons.TextRange.getDefaultInstance();
|
||||
}
|
||||
|
||||
public org.sonar.db.protobuf.DbCommons.TextRange build() {
|
||||
org.sonar.db.protobuf.DbCommons.TextRange result = buildPartial();
|
||||
if (!result.isInitialized()) {
|
||||
throw newUninitializedMessageException(result);
|
||||
}
|
||||
return result;
|
||||
}
|
||||
|
||||
public org.sonar.db.protobuf.DbCommons.TextRange buildPartial() {
|
||||
org.sonar.db.protobuf.DbCommons.TextRange result = new org.sonar.db.protobuf.DbCommons.TextRange(this);
|
||||
int from_bitField0_ = bitField0_;
|
||||
int to_bitField0_ = 0;
|
||||
if (((from_bitField0_ & 0x00000001) == 0x00000001)) {
|
||||
to_bitField0_ |= 0x00000001;
|
||||
}
|
||||
result.startLine_ = startLine_;
|
||||
if (((from_bitField0_ & 0x00000002) == 0x00000002)) {
|
||||
to_bitField0_ |= 0x00000002;
|
||||
}
|
||||
result.endLine_ = endLine_;
|
||||
if (((from_bitField0_ & 0x00000004) == 0x00000004)) {
|
||||
to_bitField0_ |= 0x00000004;
|
||||
}
|
||||
result.startOffset_ = startOffset_;
|
||||
if (((from_bitField0_ & 0x00000008) == 0x00000008)) {
|
||||
to_bitField0_ |= 0x00000008;
|
||||
}
|
||||
result.endOffset_ = endOffset_;
|
||||
result.bitField0_ = to_bitField0_;
|
||||
onBuilt();
|
||||
return result;
|
||||
}
|
||||
|
||||
public Builder mergeFrom(com.google.protobuf.Message other) {
|
||||
if (other instanceof org.sonar.db.protobuf.DbCommons.TextRange) {
|
||||
return mergeFrom((org.sonar.db.protobuf.DbCommons.TextRange)other);
|
||||
} else {
|
||||
super.mergeFrom(other);
|
||||
return this;
|
||||
}
|
||||
}
|
||||
|
||||
public Builder mergeFrom(org.sonar.db.protobuf.DbCommons.TextRange other) {
|
||||
if (other == org.sonar.db.protobuf.DbCommons.TextRange.getDefaultInstance()) return this;
|
||||
if (other.hasStartLine()) {
|
||||
setStartLine(other.getStartLine());
|
||||
}
|
||||
if (other.hasEndLine()) {
|
||||
setEndLine(other.getEndLine());
|
||||
}
|
||||
if (other.hasStartOffset()) {
|
||||
setStartOffset(other.getStartOffset());
|
||||
}
|
||||
if (other.hasEndOffset()) {
|
||||
setEndOffset(other.getEndOffset());
|
||||
}
|
||||
this.mergeUnknownFields(other.unknownFields);
|
||||
onChanged();
|
||||
return this;
|
||||
}
|
||||
|
||||
public final boolean isInitialized() {
|
||||
return true;
|
||||
}
|
||||
|
||||
public Builder mergeFrom(
|
||||
com.google.protobuf.CodedInputStream input,
|
||||
com.google.protobuf.ExtensionRegistryLite extensionRegistry)
|
||||
throws java.io.IOException {
|
||||
org.sonar.db.protobuf.DbCommons.TextRange parsedMessage = null;
|
||||
try {
|
||||
parsedMessage = PARSER.parsePartialFrom(input, extensionRegistry);
|
||||
} catch (com.google.protobuf.InvalidProtocolBufferException e) {
|
||||
parsedMessage = (org.sonar.db.protobuf.DbCommons.TextRange) e.getUnfinishedMessage();
|
||||
throw e;
|
||||
} finally {
|
||||
if (parsedMessage != null) {
|
||||
mergeFrom(parsedMessage);
|
||||
}
|
||||
}
|
||||
return this;
|
||||
}
|
||||
private int bitField0_;
|
||||
|
||||
private int startLine_ ;
|
||||
/**
|
||||
* <code>optional int32 start_line = 1;</code>
|
||||
*
|
||||
* <pre>
|
||||
* Start line. Should never be absent
|
||||
* </pre>
|
||||
*/
|
||||
public boolean hasStartLine() {
|
||||
return ((bitField0_ & 0x00000001) == 0x00000001);
|
||||
}
|
||||
/**
|
||||
* <code>optional int32 start_line = 1;</code>
|
||||
*
|
||||
* <pre>
|
||||
* Start line. Should never be absent
|
||||
* </pre>
|
||||
*/
|
||||
public int getStartLine() {
|
||||
return startLine_;
|
||||
}
|
||||
/**
|
||||
* <code>optional int32 start_line = 1;</code>
|
||||
*
|
||||
* <pre>
|
||||
* Start line. Should never be absent
|
||||
* </pre>
|
||||
*/
|
||||
public Builder setStartLine(int value) {
|
||||
bitField0_ |= 0x00000001;
|
||||
startLine_ = value;
|
||||
onChanged();
|
||||
return this;
|
||||
}
|
||||
/**
|
||||
* <code>optional int32 start_line = 1;</code>
|
||||
*
|
||||
* <pre>
|
||||
* Start line. Should never be absent
|
||||
* </pre>
|
||||
*/
|
||||
public Builder clearStartLine() {
|
||||
bitField0_ = (bitField0_ & ~0x00000001);
|
||||
startLine_ = 0;
|
||||
onChanged();
|
||||
return this;
|
||||
}
|
||||
|
||||
private int endLine_ ;
|
||||
/**
|
||||
* <code>optional int32 end_line = 2;</code>
|
||||
*
|
||||
* <pre>
|
||||
* End line (inclusive). Absent means it is same as start line
|
||||
* </pre>
|
||||
*/
|
||||
public boolean hasEndLine() {
|
||||
return ((bitField0_ & 0x00000002) == 0x00000002);
|
||||
}
|
||||
/**
|
||||
* <code>optional int32 end_line = 2;</code>
|
||||
*
|
||||
* <pre>
|
||||
* End line (inclusive). Absent means it is same as start line
|
||||
* </pre>
|
||||
*/
|
||||
public int getEndLine() {
|
||||
return endLine_;
|
||||
}
|
||||
/**
|
||||
* <code>optional int32 end_line = 2;</code>
|
||||
*
|
||||
* <pre>
|
||||
* End line (inclusive). Absent means it is same as start line
|
||||
* </pre>
|
||||
*/
|
||||
public Builder setEndLine(int value) {
|
||||
bitField0_ |= 0x00000002;
|
||||
endLine_ = value;
|
||||
onChanged();
|
||||
return this;
|
||||
}
|
||||
/**
|
||||
* <code>optional int32 end_line = 2;</code>
|
||||
*
|
||||
* <pre>
|
||||
* End line (inclusive). Absent means it is same as start line
|
||||
* </pre>
|
||||
*/
|
||||
public Builder clearEndLine() {
|
||||
bitField0_ = (bitField0_ & ~0x00000002);
|
||||
endLine_ = 0;
|
||||
onChanged();
|
||||
return this;
|
||||
}
|
||||
|
||||
private int startOffset_ ;
|
||||
/**
|
||||
* <code>optional int32 start_offset = 3;</code>
|
||||
*
|
||||
* <pre>
|
||||
* If absent it means range starts at the first offset of start line
|
||||
* </pre>
|
||||
*/
|
||||
public boolean hasStartOffset() {
|
||||
return ((bitField0_ & 0x00000004) == 0x00000004);
|
||||
}
|
||||
/**
|
||||
* <code>optional int32 start_offset = 3;</code>
|
||||
*
|
||||
* <pre>
|
||||
* If absent it means range starts at the first offset of start line
|
||||
* </pre>
|
||||
*/
|
||||
public int getStartOffset() {
|
||||
return startOffset_;
|
||||
}
|
||||
/**
|
||||
* <code>optional int32 start_offset = 3;</code>
|
||||
*
|
||||
* <pre>
|
||||
* If absent it means range starts at the first offset of start line
|
||||
* </pre>
|
||||
*/
|
||||
public Builder setStartOffset(int value) {
|
||||
bitField0_ |= 0x00000004;
|
||||
startOffset_ = value;
|
||||
onChanged();
|
||||
return this;
|
||||
}
|
||||
/**
|
||||
* <code>optional int32 start_offset = 3;</code>
|
||||
*
|
||||
* <pre>
|
||||
* If absent it means range starts at the first offset of start line
|
||||
* </pre>
|
||||
*/
|
||||
public Builder clearStartOffset() {
|
||||
bitField0_ = (bitField0_ & ~0x00000004);
|
||||
startOffset_ = 0;
|
||||
onChanged();
|
||||
return this;
|
||||
}
|
||||
|
||||
private int endOffset_ ;
|
||||
/**
|
||||
* <code>optional int32 end_offset = 4;</code>
|
||||
*
|
||||
* <pre>
|
||||
* If absent it means range ends at the last offset of end line
|
||||
* </pre>
|
||||
*/
|
||||
public boolean hasEndOffset() {
|
||||
return ((bitField0_ & 0x00000008) == 0x00000008);
|
||||
}
|
||||
/**
|
||||
* <code>optional int32 end_offset = 4;</code>
|
||||
*
|
||||
* <pre>
|
||||
* If absent it means range ends at the last offset of end line
|
||||
* </pre>
|
||||
*/
|
||||
public int getEndOffset() {
|
||||
return endOffset_;
|
||||
}
|
||||
/**
|
||||
* <code>optional int32 end_offset = 4;</code>
|
||||
*
|
||||
* <pre>
|
||||
* If absent it means range ends at the last offset of end line
|
||||
* </pre>
|
||||
*/
|
||||
public Builder setEndOffset(int value) {
|
||||
bitField0_ |= 0x00000008;
|
||||
endOffset_ = value;
|
||||
onChanged();
|
||||
return this;
|
||||
}
|
||||
/**
|
||||
* <code>optional int32 end_offset = 4;</code>
|
||||
*
|
||||
* <pre>
|
||||
* If absent it means range ends at the last offset of end line
|
||||
* </pre>
|
||||
*/
|
||||
public Builder clearEndOffset() {
|
||||
bitField0_ = (bitField0_ & ~0x00000008);
|
||||
endOffset_ = 0;
|
||||
onChanged();
|
||||
return this;
|
||||
}
|
||||
|
||||
// @@protoc_insertion_point(builder_scope:sonarqube.db.commons.TextRange)
|
||||
}
|
||||
|
||||
// @@protoc_insertion_point(class_scope:sonarqube.db.commons.TextRange)
|
||||
private static final org.sonar.db.protobuf.DbCommons.TextRange DEFAULT_INSTANCE;
|
||||
static {
|
||||
DEFAULT_INSTANCE = new org.sonar.db.protobuf.DbCommons.TextRange();
|
||||
}
|
||||
|
||||
public static org.sonar.db.protobuf.DbCommons.TextRange getDefaultInstance() {
|
||||
return DEFAULT_INSTANCE;
|
||||
}
|
||||
|
||||
public static final com.google.protobuf.Parser<TextRange> PARSER =
|
||||
new com.google.protobuf.AbstractParser<TextRange>() {
|
||||
public TextRange parsePartialFrom(
|
||||
com.google.protobuf.CodedInputStream input,
|
||||
com.google.protobuf.ExtensionRegistryLite extensionRegistry)
|
||||
throws com.google.protobuf.InvalidProtocolBufferException {
|
||||
try {
|
||||
return new TextRange(input, extensionRegistry);
|
||||
} catch (RuntimeException e) {
|
||||
if (e.getCause() instanceof
|
||||
com.google.protobuf.InvalidProtocolBufferException) {
|
||||
throw (com.google.protobuf.InvalidProtocolBufferException)
|
||||
e.getCause();
|
||||
}
|
||||
throw e;
|
||||
}
|
||||
}
|
||||
};
|
||||
|
||||
@java.lang.Override
|
||||
public com.google.protobuf.Parser<TextRange> getParserForType() {
|
||||
return PARSER;
|
||||
}
|
||||
|
||||
public org.sonar.db.protobuf.DbCommons.TextRange getDefaultInstanceForType() {
|
||||
return DEFAULT_INSTANCE;
|
||||
}
|
||||
|
||||
}
|
||||
|
||||
private static com.google.protobuf.Descriptors.Descriptor
|
||||
internal_static_sonarqube_db_commons_TextRange_descriptor;
|
||||
private static
|
||||
com.google.protobuf.GeneratedMessage.FieldAccessorTable
|
||||
internal_static_sonarqube_db_commons_TextRange_fieldAccessorTable;
|
||||
|
||||
public static com.google.protobuf.Descriptors.FileDescriptor
|
||||
getDescriptor() {
|
||||
return descriptor;
|
||||
}
|
||||
private static com.google.protobuf.Descriptors.FileDescriptor
|
||||
descriptor;
|
||||
static {
|
||||
java.lang.String[] descriptorData = {
|
||||
"\n\020db-commons.proto\022\024sonarqube.db.commons" +
|
||||
"\"[\n\tTextRange\022\022\n\nstart_line\030\001 \001(\005\022\020\n\010end" +
|
||||
"_line\030\002 \001(\005\022\024\n\014start_offset\030\003 \001(\005\022\022\n\nend" +
|
||||
"_offset\030\004 \001(\005B\031\n\025org.sonar.db.protobufH\001"
|
||||
};
|
||||
com.google.protobuf.Descriptors.FileDescriptor.InternalDescriptorAssigner assigner =
|
||||
new com.google.protobuf.Descriptors.FileDescriptor. InternalDescriptorAssigner() {
|
||||
public com.google.protobuf.ExtensionRegistry assignDescriptors(
|
||||
com.google.protobuf.Descriptors.FileDescriptor root) {
|
||||
descriptor = root;
|
||||
return null;
|
||||
}
|
||||
};
|
||||
com.google.protobuf.Descriptors.FileDescriptor
|
||||
.internalBuildGeneratedFileFrom(descriptorData,
|
||||
new com.google.protobuf.Descriptors.FileDescriptor[] {
|
||||
}, assigner);
|
||||
internal_static_sonarqube_db_commons_TextRange_descriptor =
|
||||
getDescriptor().getMessageTypes().get(0);
|
||||
internal_static_sonarqube_db_commons_TextRange_fieldAccessorTable = new
|
||||
com.google.protobuf.GeneratedMessage.FieldAccessorTable(
|
||||
internal_static_sonarqube_db_commons_TextRange_descriptor,
|
||||
new java.lang.String[] { "StartLine", "EndLine", "StartOffset", "EndOffset", });
|
||||
}
|
||||
|
||||
// @@protoc_insertion_point(outer_class_scope)
|
||||
}
|
檔案差異因為檔案過大而無法顯示
載入差異
檔案差異因為檔案過大而無法顯示
載入差異
@ -13,10 +13,6 @@
|
||||
<name>SonarQube :: Web Service</name>
|
||||
<description>Protocol Buffers specification of Web Services</description>
|
||||
|
||||
<properties>
|
||||
<sonar.exclusions>src/main/gen-java/**/*</sonar.exclusions>
|
||||
</properties>
|
||||
|
||||
<dependencies>
|
||||
<dependency>
|
||||
<groupId>com.google.protobuf</groupId>
|
||||
@ -68,29 +64,4 @@
|
||||
<artifactId>http-request</artifactId>
|
||||
</dependency>
|
||||
</dependencies>
|
||||
|
||||
|
||||
<build>
|
||||
<plugins>
|
||||
<plugin>
|
||||
<groupId>org.codehaus.mojo</groupId>
|
||||
<artifactId>build-helper-maven-plugin</artifactId>
|
||||
<executions>
|
||||
<execution>
|
||||
<id>add-source</id>
|
||||
<phase>generate-sources</phase>
|
||||
<goals>
|
||||
<goal>add-source</goal>
|
||||
</goals>
|
||||
<configuration>
|
||||
<sources>
|
||||
<source>src/main/gen-java</source>
|
||||
</sources>
|
||||
</configuration>
|
||||
</execution>
|
||||
</executions>
|
||||
</plugin>
|
||||
</plugins>
|
||||
|
||||
</build>
|
||||
</project>
|
||||
|
檔案差異因為檔案過大而無法顯示
載入差異
檔案差異因為檔案過大而無法顯示
載入差異
檔案差異因為檔案過大而無法顯示
載入差異
檔案差異因為檔案過大而無法顯示
載入差異
檔案差異因為檔案過大而無法顯示
載入差異
檔案差異因為檔案過大而無法顯示
載入差異
檔案差異因為檔案過大而無法顯示
載入差異
檔案差異因為檔案過大而無法顯示
載入差異
載入中…
新增問題並參考
Block a user