repo_id stringclasses 875
values | size int64 974 38.9k | file_path stringlengths 10 308 | content stringlengths 974 38.9k |
|---|---|---|---|
apache/openjpa | 1,107 | openjpa-persistence-jdbc/src/test/java/org/apache/openjpa/persistence/inheritance/jointable/onetomany/UMLClass.java | /*
* Licensed to the Apache Software Foundation (ASF) under one
* or more contributor license agreements. See the NOTICE file
* distributed with this work for additional information
* regarding copyright ownership. The ASF licenses this file
* to you 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.
*/
package org.apache.openjpa.persistence.inheritance.jointable.onetomany;
import java.io.Serializable;
import jakarta.persistence.Entity;
@Entity
public class UMLClass extends UMLType implements Serializable {
private static final long serialVersionUID = 1L;
public UMLClass() {
super();
}
}
|
apache/openjpa | 1,119 | openjpa-persistence-jdbc/src/test/java/org/apache/openjpa/persistence/jdbc/update/TimestampedEntity.java | /*
* Licensed to the Apache Software Foundation (ASF) under one
* or more contributor license agreements. See the NOTICE file
* distributed with this work for additional information
* regarding copyright ownership. The ASF licenses this file
* to you 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.
*/
package org.apache.openjpa.persistence.jdbc.update;
import jakarta.persistence.Entity;
import jakarta.persistence.Table;
/**
* An entity using a Timestamp as Version field.
*
*
* @author Pinaki Poddar
*
*/
@Entity
@Table(name="TSENTITY1")
public class TimestampedEntity extends BaseTimestampedEntity{
}
|
apache/openjpa | 1,133 | openjpa-persistence/src/main/java/org/apache/openjpa/persistence/query/SizeExpression.java | /*
* Licensed to the Apache Software Foundation (ASF) under one
* or more contributor license agreements. See the NOTICE file
* distributed with this work for additional information
* regarding copyright ownership. The ASF licenses this file
* to you 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.
*/
package org.apache.openjpa.persistence.query;
/**
* Denotes SIZE(e) Expression.
*
* @author Pinaki Poddar
*
*/
public class SizeExpression extends UnaryOperatorExpression {
private static final long serialVersionUID = 1L;
public SizeExpression(Expression op) {
super(op, UnaryFunctionalOperator.SIZE);
}
}
|
apache/openjpa | 1,143 | openjpa-slice/src/main/java/org/apache/openjpa/slice/jdbc/DistributedStatement.java | /*
* Licensed to the Apache Software Foundation (ASF) under one
* or more contributor license agreements. See the NOTICE file
* distributed with this work for additional information
* regarding copyright ownership. The ASF licenses this file
* to you 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.
*/
package org.apache.openjpa.slice.jdbc;
import java.sql.Statement;
/**
* A virtual Statement that delegates to many actual Statements.
*
* @author Pinaki Poddar
*
*/
public class DistributedStatement extends
DistributedTemplate<Statement> {
public DistributedStatement(DistributedConnection c) {
super(c);
}
}
|
apache/openwebbeans | 1,110 | webbeans-impl/src/test/java/org/apache/webbeans/test/component/exception/initializer/BrokenInitializer1.java | /*
* Licensed to the Apache Software Foundation (ASF) under one
* or more contributor license agreements. See the NOTICE file
* distributed with this work for additional information
* regarding copyright ownership. The ASF licenses this file
* to you 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.
*/
package org.apache.webbeans.test.component.exception.initializer;
import jakarta.enterprise.inject.Produces;
import jakarta.inject.Inject;
public class BrokenInitializer1
{
public BrokenInitializer1()
{
}
@Inject @Produces
public void init1()
{
}
}
|
apache/orc | 1,168 | java/core/src/java/org/apache/orc/BooleanColumnStatistics.java | /*
* Licensed to the Apache Software Foundation (ASF) under one
* or more contributor license agreements. See the NOTICE file
* distributed with this work for additional information
* regarding copyright ownership. The ASF licenses this file
* to you 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.
*/
package org.apache.orc;
/**
* Statistics for boolean columns.
*/
public interface BooleanColumnStatistics extends ColumnStatistics {
/**
* Get the number of false values.
* @return the number of false values
*/
long getFalseCount();
/**
* Get the number of true values.
* @return the number of true values
*/
long getTrueCount();
}
|
apache/phoenix | 1,144 | phoenix-core-client/src/main/java/org/apache/phoenix/expression/function/EncodeFormat.java | /*
* Licensed to the Apache Software Foundation (ASF) under one
* or more contributor license agreements. See the NOTICE file
* distributed with this work for additional information
* regarding copyright ownership. The ASF licenses this file
* to you 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.
*/
package org.apache.phoenix.expression.function;
public enum EncodeFormat {
HEX, // format for encoding HEX value to bytes
BASE62, // format for encoding a base 10 long value to base 62 string
BASE64, // format for encoding a base 10 long value to base 64 string
ASCII, // Plain Text
HBASE // HBase-specific escaping format
};
|
apache/pig | 1,194 | src/org/apache/pig/LoadStoreCaster.java | /* Licensed to the Apache Software Foundation (ASF) under one
* or more contributor license agreements. See the NOTICE file
* distributed with this work for additional information
* regarding copyright ownership. The ASF licenses this file
* to you 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.
*/
package org.apache.pig;
import org.apache.pig.classification.InterfaceAudience;
import org.apache.pig.classification.InterfaceStability;
/**
* This is just a union interface of LoadCaster and StoreCaster,
* made available for simplicity.
* @since Pig 0.8
*/
@InterfaceAudience.Public
@InterfaceStability.Evolving
public interface LoadStoreCaster extends LoadCaster, StoreCaster {
}
|
apache/pinot | 1,132 | pinot-core/src/main/java/org/apache/pinot/core/data/manager/realtime/SegmentBuildFailureException.java | /**
* Licensed to the Apache Software Foundation (ASF) under one
* or more contributor license agreements. See the NOTICE file
* distributed with this work for additional information
* regarding copyright ownership. The ASF licenses this file
* to you 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.
*/
package org.apache.pinot.core.data.manager.realtime;
public class SegmentBuildFailureException extends Exception {
public SegmentBuildFailureException(String errorMessage, Throwable cause) {
super(errorMessage, cause);
}
public SegmentBuildFailureException(String errorMessage) {
super(errorMessage);
}
}
|
apache/poi | 1,157 | poi-ooxml/src/main/java/org/apache/poi/xddf/usermodel/chart/ChartTypes.java | /* ====================================================================
Licensed to the Apache Software Foundation (ASF) under one or more
contributor license agreements. See the NOTICE file distributed with
this work for additional information regarding copyright ownership.
The ASF licenses this file to You 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.
==================================================================== */
package org.apache.poi.xddf.usermodel.chart;
public enum ChartTypes {
AREA,
AREA3D,
BAR,
BAR3D,
DOUGHNUT,
LINE,
LINE3D,
PIE,
PIE3D,
RADAR,
SCATTER,
SURFACE,
SURFACE3D
}
|
apache/polygene-java | 1,112 | libraries/restlet/src/main/java/org/apache/polygene/library/restlet/repository/MissingRepositoryException.java | /*
* Licensed to the Apache Software Foundation (ASF) under one
* or more contributor license agreements. See the NOTICE file
* distributed with this work for additional information
* regarding copyright ownership. The ASF licenses this file
* to you 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.
*
*
*/
package org.apache.polygene.library.restlet.repository;
public class MissingRepositoryException extends RuntimeException
{
public MissingRepositoryException( Class typeName )
{
super( "There is no Entity Repository @Tagged with the name '" + typeName + "'" );
}
}
|
apache/polygene-java | 1,118 | libraries/sql-generator/src/test/java/org/apache/polygene/library/sql/generator/SQLiteModificationTest.java | /*
* Copyright (c) 2012, Stanislav Muhametsin. All Rights Reserved.
*
* 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.
*
*/
package org.apache.polygene.library.sql.generator;
import org.apache.polygene.library.sql.generator.vendor.SQLVendor;
import org.apache.polygene.library.sql.generator.vendor.SQLVendorProvider;
import org.apache.polygene.library.sql.generator.vendor.SQLiteVendor;
public class SQLiteModificationTest extends AbstractModificationTest
{
@Override
protected SQLVendor loadVendor()
throws Exception
{
return SQLVendorProvider.createVendor( SQLiteVendor.class );
}
}
|
apache/polygene-java | 1,129 | core/runtime/src/test/java/org/apache/polygene/runtime/query/model/values/ContactValue.java | /*
* Licensed to the Apache Software Foundation (ASF) under one
* or more contributor license agreements. See the NOTICE file
* distributed with this work for additional information
* regarding copyright ownership. The ASF licenses this file
* to you 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.
*
*
*/
package org.apache.polygene.runtime.query.model.values;
import org.apache.polygene.api.property.Property;
import org.apache.polygene.api.value.ValueComposite;
/**
* JAVADOC
*/
public interface ContactValue
extends ValueComposite
{
Property<String> email();
Property<String> phone();
}
|
apache/polygene-java | 1,149 | core/testsupport/src/main/java/org/apache/polygene/test/model/Address.java | /*
* Licensed to the Apache Software Foundation (ASF) under one
* or more contributor license agreements. See the NOTICE file
* distributed with this work for additional information
* regarding copyright ownership. The ASF licenses this file
* to you 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.
*
*
*/
package org.apache.polygene.test.model;
import org.apache.polygene.api.property.Property;
import org.apache.polygene.api.value.ValueComposite;
public interface Address extends ValueComposite // necessary, @See POLYGENE-137
{
Property<String> line1();
Property<String> line2();
Property<String> zipcode();
}
|
apache/polygene-java | 1,151 | core/api/src/main/java/org/apache/polygene/api/util/VisitableHierarchy.java | /*
* Licensed to the Apache Software Foundation (ASF) under one
* or more contributor license agreements. See the NOTICE file
* distributed with this work for additional information
* regarding copyright ownership. The ASF licenses this file
* to you 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.
*
*
*/
package org.apache.polygene.api.util;
/**
* Interface that visitable hierarchies of objects should implement.
*/
public interface VisitableHierarchy<NODE, LEAF>
{
<ThrowableType extends Throwable> boolean accept( HierarchicalVisitor<? super NODE, ? super LEAF, ThrowableType> visitor )
throws ThrowableType;
}
|
apache/rocketmq | 1,153 | remoting/src/main/java/org/apache/rocketmq/remoting/RemotingService.java | /*
* Licensed to the Apache Software Foundation (ASF) under one or more
* contributor license agreements. See the NOTICE file distributed with
* this work for additional information regarding copyright ownership.
* The ASF licenses this file to You 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.
*/
package org.apache.rocketmq.remoting;
import org.apache.rocketmq.remoting.pipeline.RequestPipeline;
public interface RemotingService {
void start();
void shutdown();
void registerRPCHook(RPCHook rpcHook);
void setRequestPipeline(RequestPipeline pipeline);
/**
* Remove all rpc hooks.
*/
void clearRPCHook();
}
|
apache/royale-compiler | 1,137 | compiler/src/main/java/org/apache/royale/compiler/internal/scopes/ClosureScope.java | /*
*
* Licensed to the Apache Software Foundation (ASF) under one or more
* contributor license agreements. See the NOTICE file distributed with
* this work for additional information regarding copyright ownership.
* The ASF licenses this file to You 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.
*
*/
package org.apache.royale.compiler.internal.scopes;
/**
* Sub-class of ASScope used for function scopes. all definition in scope of
* this type are local to a function.
*/
public class ClosureScope extends ASScope
{
public ClosureScope(ASScope containingScope)
{
super(containingScope);
}
}
|
apache/rya | 1,151 | dao/mongodb.rya/src/main/java/org/apache/rya/mongodb/dao/MongoDBNamespaceManager.java | /**
* Licensed to the Apache Software Foundation (ASF) under one
* or more contributor license agreements. See the NOTICE file
* distributed with this work for additional information
* regarding copyright ownership. The ASF licenses this file
* to you 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.
*/
package org.apache.rya.mongodb.dao;
import org.apache.rya.api.persist.RyaNamespaceManager;
import org.apache.rya.mongodb.StatefulMongoDBRdfConfiguration;
import com.mongodb.DBCollection;
public interface MongoDBNamespaceManager extends RyaNamespaceManager<StatefulMongoDBRdfConfiguration>{
public void createIndices(DBCollection coll);
} |
apache/seatunnel-web | 1,111 | seatunnel-server/seatunnel-app/src/main/java/org/apache/seatunnel/app/domain/response/connector/ConnectorInfo.java | /*
* Licensed to the Apache Software Foundation (ASF) under one or more
* contributor license agreements. See the NOTICE file distributed with
* this work for additional information regarding copyright ownership.
* The ASF licenses this file to You 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.
*/
package org.apache.seatunnel.app.domain.response.connector;
import org.apache.seatunnel.api.common.PluginIdentifier;
import lombok.AllArgsConstructor;
import lombok.Data;
@Data
@AllArgsConstructor
public class ConnectorInfo {
private PluginIdentifier pluginIdentifier;
private String artifactId;
}
|
apache/seatunnel | 1,073 | seatunnel-engine/seatunnel-engine-storage/checkpoint-storage-api/src/main/java/org/apache/seatunnel/engine/checkpoint/storage/constants/StorageConstants.java | /*
* Licensed to the Apache Software Foundation (ASF) under one
* or more contributor license agreements. See the NOTICE file
* distributed with this work for additional information
* regarding copyright ownership. The ASF licenses this file
* to you 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.
*
*/
package org.apache.seatunnel.engine.checkpoint.storage.constants;
public class StorageConstants {
/** The name of the configuration property that specifies the name of the file system. */
public static final String STORAGE_NAME_SPACE = "namespace";
}
|
apache/seatunnel | 1,097 | seatunnel-connectors-v2/connector-assert/src/main/java/org/apache/seatunnel/connectors/seatunnel/assertion/rule/AssertTableRule.java | /*
* Licensed to the Apache Software Foundation (ASF) under one or more
* contributor license agreements. See the NOTICE file distributed with
* this work for additional information regarding copyright ownership.
* The ASF licenses this file to You 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.
*/
package org.apache.seatunnel.connectors.seatunnel.assertion.rule;
import lombok.AllArgsConstructor;
import lombok.Data;
import java.io.Serializable;
import java.util.List;
@Data
@AllArgsConstructor
public class AssertTableRule implements Serializable {
private List<String> tableNames;
}
|
apache/servicecomb-java-chassis | 1,082 | foundations/foundation-protobuf/src/test/java/org/apache/servicecomb/foundation/protobuf/internal/schema/scalar/TestSInt32Schema.java | /*
* Licensed to the Apache Software Foundation (ASF) under one or more
* contributor license agreements. See the NOTICE file distributed with
* this work for additional information regarding copyright ownership.
* The ASF licenses this file to You 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.
*/
package org.apache.servicecomb.foundation.protobuf.internal.schema.scalar;
public class TestSInt32Schema extends TestNumberBaseSchema {
public TestSInt32Schema() {
minValue = Integer.MIN_VALUE;
maxValue = Integer.MAX_VALUE;
initFields("sint32", "objSint32");
}
}
|
apache/servicecomb-java-chassis | 1,082 | foundations/foundation-protobuf/src/test/java/org/apache/servicecomb/foundation/protobuf/internal/schema/scalar/TestUInt32Schema.java | /*
* Licensed to the Apache Software Foundation (ASF) under one or more
* contributor license agreements. See the NOTICE file distributed with
* this work for additional information regarding copyright ownership.
* The ASF licenses this file to You 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.
*/
package org.apache.servicecomb.foundation.protobuf.internal.schema.scalar;
public class TestUInt32Schema extends TestNumberBaseSchema {
public TestUInt32Schema() {
minValue = Integer.MIN_VALUE;
maxValue = Integer.MAX_VALUE;
initFields("uint32", "objUint32");
}
}
|
apache/servicecomb-java-chassis | 1,084 | clients/service-center-client/src/main/java/org/apache/servicecomb/service/center/client/model/RegisteredMicroserviceResponse.java | /*
* Licensed to the Apache Software Foundation (ASF) under one or more
* contributor license agreements. See the NOTICE file distributed with
* this work for additional information regarding copyright ownership.
* The ASF licenses this file to You 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.
*/
package org.apache.servicecomb.service.center.client.model;
public class RegisteredMicroserviceResponse {
private String serviceId;
public String getServiceId() {
return serviceId;
}
public void setServiceId(String serviceId) {
this.serviceId = serviceId;
}
}
|
apache/servicecomb-java-chassis | 1,122 | demo/demo-etcd/test-client/src/main/java/org/apache/servicecomb/samples/User.java | /*
* Licensed to the Apache Software Foundation (ASF) under one or more
* contributor license agreements. See the NOTICE file distributed with
* this work for additional information regarding copyright ownership.
* The ASF licenses this file to You 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.
*/
package org.apache.servicecomb.samples;
public class User {
private Long id;
private String name;
public Long getId() {
return id;
}
public void setId(Long id) {
this.id = id;
}
public String getName() {
return name;
}
public void setName(String name) {
this.name = name;
}
}
|
apache/shardingsphere | 1,119 | features/broadcast/core/src/main/java/org/apache/shardingsphere/broadcast/constant/BroadcastOrder.java | /*
* Licensed to the Apache Software Foundation (ASF) under one or more
* contributor license agreements. See the NOTICE file distributed with
* this work for additional information regarding copyright ownership.
* The ASF licenses this file to You 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.
*/
package org.apache.shardingsphere.broadcast.constant;
import lombok.AccessLevel;
import lombok.NoArgsConstructor;
/**
* Broadcast order.
*/
@NoArgsConstructor(access = AccessLevel.PRIVATE)
public final class BroadcastOrder {
/**
* Broadcast order.
*/
public static final int ORDER = 15;
}
|
apache/shenyu | 1,100 | shenyu-protocol/shenyu-protocol-tcp/src/main/java/org/apache/shenyu/protocol/tcp/connection/ClientConnectionConfigProvider.java | /*
* Licensed to the Apache Software Foundation (ASF) under one or more
* contributor license agreements. See the NOTICE file distributed with
* this work for additional information regarding copyright ownership.
* The ASF licenses this file to You 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.
*/
package org.apache.shenyu.protocol.tcp.connection;
import java.net.URI;
/**
* ClientConnectionConfigProvider.
*/
public interface ClientConnectionConfigProvider {
/**
* getProxiedService.
*
* @param ip ip
* @return URI
*/
URI getProxiedService(String ip);
}
|
apache/sis | 1,172 | endorsed/src/org.apache.sis.test.endorsed/test/module-info.java | /*
* Licensed to the Apache Software Foundation (ASF) under one or more
* contributor license agreements. See the NOTICE file distributed with
* this work for additional information regarding copyright ownership.
* The ASF licenses this file to You 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.
*/
/**
* Additional dependencies needed for Apache SIS tests.
*
* @author Martin Desruisseaux (Geomatys)
* @version 1.4
* @since 1.4
*/
module org.apache.sis.test.endorsed {
requires transitive org.junit.jupiter.api;
requires transitive org.opengis.geoapi.conformance;
requires transitive org.apache.derby.tools;
requires transitive org.hsqldb;
}
|
apache/sis | 1,173 | endorsed/src/org.apache.sis.openoffice/main/module-info.java | /*
* Licensed to the Apache Software Foundation (ASF) under one or more
* contributor license agreements. See the NOTICE file distributed with
* this work for additional information regarding copyright ownership.
* The ASF licenses this file to You 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.
*/
/**
* Apache SIS services for OpenOffice.
*
* @author Martin Desruisseaux (Geomatys)
* @version 1.4
* @since 0.3
*/
module org.apache.sis.openoffice {
requires transitive java.logging;
requires transitive static org.libreoffice.uno;
requires org.apache.sis.referencing;
requires org.apache.sis.storage;
exports org.apache.sis.openoffice;
}
|
apache/skywalking | 1,098 | oap-server/server-library/library-util/src/main/java/org/apache/skywalking/oap/server/library/util/ConnectStringParseException.java | /*
* Licensed to the Apache Software Foundation (ASF) under one or more
* contributor license agreements. See the NOTICE file distributed with
* this work for additional information regarding copyright ownership.
* The ASF licenses this file to You 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.
*
*/
package org.apache.skywalking.oap.server.library.util;
/**
* Thrown if the given string which build with hosts and ports is incorrect.
*/
public class ConnectStringParseException extends Exception {
public ConnectStringParseException(String message) {
super(message);
}
}
|
apache/skywalking | 1,120 | oap-server/server-core/src/main/java/org/apache/skywalking/oap/server/core/annotation/AnnotationListener.java | /*
* Licensed to the Apache Software Foundation (ASF) under one or more
* contributor license agreements. See the NOTICE file distributed with
* this work for additional information regarding copyright ownership.
* The ASF licenses this file to You 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.
*
*/
package org.apache.skywalking.oap.server.core.annotation;
import java.lang.annotation.Annotation;
import org.apache.skywalking.oap.server.core.storage.StorageException;
public interface AnnotationListener {
Class<? extends Annotation> annotation();
void notify(Class aClass) throws StorageException;
}
|
apache/streampipes | 1,121 | streampipes-extensions-api/src/main/java/org/apache/streampipes/extensions/api/migration/IDataSinkMigrator.java | /*
* Licensed to the Apache Software Foundation (ASF) under one or more
* contributor license agreements. See the NOTICE file distributed with
* this work for additional information regarding copyright ownership.
* The ASF licenses this file to You 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.
*
*/
package org.apache.streampipes.extensions.api.migration;
import org.apache.streampipes.extensions.api.extractor.IDataSinkParameterExtractor;
import org.apache.streampipes.model.graph.DataSinkInvocation;
public interface IDataSinkMigrator extends IModelMigrator<DataSinkInvocation, IDataSinkParameterExtractor> {
}
|
apache/struts | 1,143 | core/src/main/java/org/apache/struts2/conversion/annotations/ConversionType.java | /*
* Licensed to the Apache Software Foundation (ASF) under one
* or more contributor license agreements. See the NOTICE file
* distributed with this work for additional information
* regarding copyright ownership. The ASF licenses this file
* to you 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.
*/
package org.apache.struts2.conversion.annotations;
/**
* <code>ConversionType</code>
*
* @author <a href="mailto:hermanns@aixcept.de">Rainer Hermanns</a>
* @version $Id$
*/
public enum ConversionType {
APPLICATION, CLASS;
@Override
public String toString() {
return super.toString().toUpperCase();
}
}
|
apache/syncope | 1,127 | core/provisioning-api/src/main/java/org/apache/syncope/core/provisioning/api/data/SRARouteDataBinder.java | /*
* Licensed to the Apache Software Foundation (ASF) under one
* or more contributor license agreements. See the NOTICE file
* distributed with this work for additional information
* regarding copyright ownership. The ASF licenses this file
* to you 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.
*/
package org.apache.syncope.core.provisioning.api.data;
import org.apache.syncope.common.lib.to.SRARouteTO;
import org.apache.syncope.core.persistence.api.entity.SRARoute;
public interface SRARouteDataBinder {
void getSRARoute(SRARoute route, SRARouteTO routeTO);
SRARouteTO getSRARouteTO(SRARoute route);
}
|
apache/syncope | 1,130 | client/idrepo/console/src/main/java/org/apache/syncope/client/console/commons/RealmPolicyProvider.java | /*
* Licensed to the Apache Software Foundation (ASF) under one
* or more contributor license agreements. See the NOTICE file
* distributed with this work for additional information
* regarding copyright ownership. The ASF licenses this file
* to you 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.
*/
package org.apache.syncope.client.console.commons;
import java.io.Serializable;
import org.apache.syncope.common.lib.to.RealmTO;
import org.apache.wicket.markup.repeater.RepeatingView;
@FunctionalInterface
public interface RealmPolicyProvider extends Serializable {
void add(RealmTO realmTO, RepeatingView view);
}
|
apache/systemds | 1,160 | src/test/java/org/apache/sysds/performance/PerfUtil.java | /*
* Licensed to the Apache Software Foundation (ASF) under one
* or more contributor license agreements. See the NOTICE file
* distributed with this work for additional information
* regarding copyright ownership. The ASF licenses this file
* to you 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.
*/
package org.apache.sysds.performance;
import java.io.FileInputStream;
import java.io.IOException;
import java.io.InputStream;
public interface PerfUtil {
public static String readSpec(String path) throws IOException {
InputStream in = new FileInputStream(path);
String spec = new String(in.readAllBytes());
in.close();
return spec;
}
}
|
apache/tapestry-5 | 1,126 | tapestry-core/src/test/java/org/apache/tapestry5/internal/services/ComplexObject.java | // Copyright 2009 The Apache Software Foundation
//
// 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.
package org.apache.tapestry5.internal.services;
public class ComplexObject
{
private int nestedIndex;
public NestedObject get(int index)
{
switch (index)
{
case 0:
return new NestedObject("zero");
default:
return new NestedObject("one");
}
}
public int getNestedIndex()
{
return nestedIndex;
}
public void setNestedIndex(int nestedIndex)
{
this.nestedIndex = nestedIndex;
}
}
|
apache/tomee | 1,094 | arquillian/arquillian-tomee-tests/arquillian-tomee-webprofile-tests/src/test/java/org/apache/openejb/arquillian/tests/appcomposer/Bean1.java | /**
* Licensed to the Apache Software Foundation (ASF) under one or more
* contributor license agreements. See the NOTICE file distributed with
* this work for additional information regarding copyright ownership.
* The ASF licenses this file to You 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.
*/
package org.apache.openejb.arquillian.tests.appcomposer;
import jakarta.persistence.EntityManager;
import jakarta.persistence.PersistenceContext;
public class Bean1 {
@PersistenceContext
private EntityManager em;
public EntityManager getEm() {
return em;
}
}
|
apache/unomi | 1,130 | persistence-elasticsearch/core/src/main/java/org/apache/unomi/persistence/elasticsearch/ESItemMixIn.java | /*
* Licensed to the Apache Software Foundation (ASF) under one or more
* contributor license agreements. See the NOTICE file distributed with
* this work for additional information regarding copyright ownership.
* The ASF licenses this file to You 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.
*/
package org.apache.unomi.persistence.elasticsearch;
import com.fasterxml.jackson.annotation.JsonIgnore;
/**
* This mixin is used in ESCustomObjectMapper to avoid the version parameter to be registered in ES
*/
public abstract class ESItemMixIn {
public ESItemMixIn() { }
@JsonIgnore abstract Long getVersion();
}
|
apache/xmlgraphics-fop | 1,138 | fop-core/src/test/java/org/apache/fop/intermediate/IntermediateFormatTestSuite.java | /*
* Licensed to the Apache Software Foundation (ASF) under one or more
* contributor license agreements. See the NOTICE file distributed with
* this work for additional information regarding copyright ownership.
* The ASF licenses this file to You 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.
*/
/* $Id$ */
package org.apache.fop.intermediate;
import org.junit.runner.RunWith;
import org.junit.runners.Suite;
import org.junit.runners.Suite.SuiteClasses;
/**
* A test suite for testing the Intermediate Format output.
*/
@RunWith(Suite.class)
@SuiteClasses(IFTestCase.class)
public final class IntermediateFormatTestSuite {
}
|
google/binnavi | 1,130 | src/main/java/com/google/security/zynamics/binnavi/debug/connection/packets/replies/ResumeReply.java | // Copyright 2011-2016 Google LLC
//
// 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.
package com.google.security.zynamics.binnavi.debug.connection.packets.replies;
/**
* Represents the reply to a Resume request sent to the debug client.
*/
public final class ResumeReply extends DebuggerReply {
/**
* Creates a new Resume reply object.
*
* @param packetId Packet ID of the reply.
* @param errorCode Error code of the reply. If this error code is 0, the requested operation was
* successful.
*/
public ResumeReply(final int packetId, final int errorCode) {
super(packetId, errorCode);
}
}
|
google/cel-java | 1,161 | common/src/test/java/dev/cel/common/types/OptionalTypeTest.java | // Copyright 2023 Google LLC
//
// 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
//
// https://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.
package dev.cel.common.types;
import static com.google.common.truth.Truth.assertThat;
import org.junit.Test;
import org.junit.runner.RunWith;
import org.junit.runners.JUnit4;
@RunWith(JUnit4.class)
public class OptionalTypeTest {
@Test
public void createOptionalType_success() {
OptionalType optionalType = OptionalType.create(SimpleType.STRING);
assertThat(optionalType.name()).isEqualTo("optional_type");
assertThat(optionalType.kind()).isEqualTo(CelKind.OPAQUE);
assertThat(optionalType.parameters()).containsExactly(SimpleType.STRING);
}
}
|
google/graphicsfuzz | 1,145 | ast/src/main/java/com/graphicsfuzz/common/glslversion/Glsl430.java | /*
* Copyright 2018 The GraphicsFuzz Project Authors
*
* 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
*
* https://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.
*/
package com.graphicsfuzz.common.glslversion;
final class Glsl430 extends CompositeShadingLanguageVersion {
static final ShadingLanguageVersion INSTANCE = new Glsl430(Glsl420.INSTANCE);
private Glsl430(ShadingLanguageVersion prototype) {
super(prototype);
// Singleton
}
@Override
public String getVersionString() {
return "430";
}
@Override
public boolean supportedComputeShaders() {
return true;
}
@Override
public boolean supportedAtomicMemoryFunctions() {
return true;
}
}
|
google/guava | 1,142 | guava-testlib/src/com/google/common/collect/testing/google/TestListMultimapGenerator.java | /*
* Copyright (C) 2012 The Guava Authors
*
* 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.
*/
package com.google.common.collect.testing.google;
import com.google.common.annotations.GwtCompatible;
import com.google.common.collect.ListMultimap;
import org.jspecify.annotations.NullMarked;
import org.jspecify.annotations.Nullable;
/**
* A generator for {@code ListMultimap} implementations based on test data.
*
* @author Louis Wasserman
*/
@GwtCompatible
@NullMarked
public interface TestListMultimapGenerator<K extends @Nullable Object, V extends @Nullable Object>
extends TestMultimapGenerator<K, V, ListMultimap<K, V>> {}
|
google/guava | 1,161 | android/guava/src/com/google/common/primitives/IgnoreJRERequirement.java | /*
* Copyright 2019 The Guava Authors
*
* 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.
*/
package com.google.common.primitives;
import static java.lang.annotation.ElementType.CONSTRUCTOR;
import static java.lang.annotation.ElementType.FIELD;
import static java.lang.annotation.ElementType.METHOD;
import static java.lang.annotation.ElementType.TYPE;
import java.lang.annotation.Target;
/**
* Disables Animal Sniffer's checking of compatibility with older versions of Java/Android.
*
* <p>Each package's copy of this annotation needs to be listed in our {@code pom.xml}.
*/
@Target({METHOD, CONSTRUCTOR, TYPE, FIELD})
@interface IgnoreJRERequirement {}
|
google/guava | 1,174 | guava/src/com/google/common/reflect/TypeCapture.java | /*
* Copyright (C) 2012 The Guava Authors
*
* 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.
*/
package com.google.common.reflect;
import static com.google.common.base.Preconditions.checkArgument;
import java.lang.reflect.ParameterizedType;
import java.lang.reflect.Type;
/**
* Captures the actual type of {@code T}.
*
* @author Ben Yu
*/
abstract class TypeCapture<T> {
/** Returns the captured type. */
final Type capture() {
Type superclass = getClass().getGenericSuperclass();
checkArgument(superclass instanceof ParameterizedType, "%s isn't parameterized", superclass);
return ((ParameterizedType) superclass).getActualTypeArguments()[0];
}
}
|
google/j2objc | 1,124 | jre_emul/android/platform/external/icu/android_icu4j/src/main/java/android/icu/util/Output.java | /* GENERATED SOURCE. DO NOT MODIFY. */
// © 2016 and later: Unicode, Inc. and others.
// License & terms of use: http://www.unicode.org/copyright.html#License
/*
*******************************************************************************
* Copyright (C) 2011-2016, International Business Machines Corporation and *
* others. All Rights Reserved. *
*******************************************************************************
*/
package android.icu.util;
/**
* Simple struct-like class for output parameters.
* @param <T> The type of the parameter.
*/
public class Output<T> {
/**
* The value field
*/
public T value;
/**
* {@inheritDoc}
*/
@Override
public String toString() {
return value == null ? "null" : value.toString();
}
/**
* Constructs an empty <code>Output</code>
*/
public Output() {
}
/**
* Constructs an <code>Output</code> with the given value.
* @param value the initial value
*/
public Output(T value) {
this.value = value;
}
}
|
google/kiwi-solver | 1,178 | src/main/java/kiwi/search/Objective.java | /*
* Copyright 2016, Google Inc.
*
* 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.
*/
package kiwi.search;
import kiwi.variable.IntVar;
public class Objective {
private final IntVar objVar;
private final boolean minimize;
private int bestValue;
public Objective(IntVar objVar, boolean minimize) {
this.objVar = objVar;
this.minimize = minimize;
this.bestValue = minimize ? IntVar.MAX_VALUE : IntVar.MIN_VALUE;
}
public void tighten() {
bestValue = minimize ? objVar.max() - 1 : objVar.min() + 1;
}
public boolean propagate() {
return minimize ? objVar.updateMax(bestValue) : objVar.updateMin(bestValue);
}
}
|
google/samba-documents-provider | 1,130 | app/src/main/java/com/google/android/sambadocumentsprovider/nativefacade/SmbFile.java | /*
* Copyright 2017 Google Inc.
*
* This program is free software: you can redistribute it and/or modify
* it under the terms of the GNU General Public License as published by
* the Free Software Foundation, either version 3 of the License, or
* (at your option) any later version.
*
* This program is distributed in the hope that it will be useful,
* but WITHOUT ANY WARRANTY; without even the implied warranty of
* MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
* GNU General Public License for more details.
*
* You should have received a copy of the GNU General Public License
* along with this program. If not, see <http://www.gnu.org/licenses/>.
*/
package com.google.android.sambadocumentsprovider.nativefacade;
import android.system.StructStat;
import java.io.Closeable;
import java.io.IOException;
import java.nio.ByteBuffer;
public interface SmbFile extends Closeable {
int read(ByteBuffer buffer, int maxLen) throws IOException;
int write(ByteBuffer buffer, int length) throws IOException;
long seek(long offset) throws IOException;
StructStat fstat() throws IOException;
}
|
googleads/google-ads-java | 1,114 | google-ads-stubs-v19/src/main/java/com/google/ads/googleads/v19/common/UserInterestInfoOrBuilder.java | // Generated by the protocol buffer compiler. DO NOT EDIT!
// source: google/ads/googleads/v19/common/criteria.proto
// Protobuf Java Version: 3.25.7
package com.google.ads.googleads.v19.common;
public interface UserInterestInfoOrBuilder extends
// @@protoc_insertion_point(interface_extends:google.ads.googleads.v19.common.UserInterestInfo)
com.google.protobuf.MessageOrBuilder {
/**
* <pre>
* The UserInterest resource name.
* </pre>
*
* <code>optional string user_interest_category = 2;</code>
* @return Whether the userInterestCategory field is set.
*/
boolean hasUserInterestCategory();
/**
* <pre>
* The UserInterest resource name.
* </pre>
*
* <code>optional string user_interest_category = 2;</code>
* @return The userInterestCategory.
*/
java.lang.String getUserInterestCategory();
/**
* <pre>
* The UserInterest resource name.
* </pre>
*
* <code>optional string user_interest_category = 2;</code>
* @return The bytes for userInterestCategory.
*/
com.google.protobuf.ByteString
getUserInterestCategoryBytes();
}
|
googleads/google-ads-java | 1,114 | google-ads-stubs-v20/src/main/java/com/google/ads/googleads/v20/common/UserInterestInfoOrBuilder.java | // Generated by the protocol buffer compiler. DO NOT EDIT!
// source: google/ads/googleads/v20/common/criteria.proto
// Protobuf Java Version: 3.25.7
package com.google.ads.googleads.v20.common;
public interface UserInterestInfoOrBuilder extends
// @@protoc_insertion_point(interface_extends:google.ads.googleads.v20.common.UserInterestInfo)
com.google.protobuf.MessageOrBuilder {
/**
* <pre>
* The UserInterest resource name.
* </pre>
*
* <code>optional string user_interest_category = 2;</code>
* @return Whether the userInterestCategory field is set.
*/
boolean hasUserInterestCategory();
/**
* <pre>
* The UserInterest resource name.
* </pre>
*
* <code>optional string user_interest_category = 2;</code>
* @return The userInterestCategory.
*/
java.lang.String getUserInterestCategory();
/**
* <pre>
* The UserInterest resource name.
* </pre>
*
* <code>optional string user_interest_category = 2;</code>
* @return The bytes for userInterestCategory.
*/
com.google.protobuf.ByteString
getUserInterestCategoryBytes();
}
|
googleads/google-ads-java | 1,114 | google-ads-stubs-v21/src/main/java/com/google/ads/googleads/v21/common/UserInterestInfoOrBuilder.java | // Generated by the protocol buffer compiler. DO NOT EDIT!
// source: google/ads/googleads/v21/common/criteria.proto
// Protobuf Java Version: 3.25.7
package com.google.ads.googleads.v21.common;
public interface UserInterestInfoOrBuilder extends
// @@protoc_insertion_point(interface_extends:google.ads.googleads.v21.common.UserInterestInfo)
com.google.protobuf.MessageOrBuilder {
/**
* <pre>
* The UserInterest resource name.
* </pre>
*
* <code>optional string user_interest_category = 2;</code>
* @return Whether the userInterestCategory field is set.
*/
boolean hasUserInterestCategory();
/**
* <pre>
* The UserInterest resource name.
* </pre>
*
* <code>optional string user_interest_category = 2;</code>
* @return The userInterestCategory.
*/
java.lang.String getUserInterestCategory();
/**
* <pre>
* The UserInterest resource name.
* </pre>
*
* <code>optional string user_interest_category = 2;</code>
* @return The bytes for userInterestCategory.
*/
com.google.protobuf.ByteString
getUserInterestCategoryBytes();
}
|
googleapis/google-cloud-java | 1,045 | java-bigquery-data-exchange/proto-google-cloud-bigquery-data-exchange-v1beta1/src/main/java/com/google/cloud/bigquery/dataexchange/v1beta1/SubscribeListingResponseOrBuilder.java | /*
* Copyright 2025 Google LLC
*
* 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
*
* https://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.
*/
// Generated by the protocol buffer compiler. DO NOT EDIT!
// source: google/cloud/bigquery/dataexchange/v1beta1/dataexchange.proto
// Protobuf Java Version: 3.25.8
package com.google.cloud.bigquery.dataexchange.v1beta1;
public interface SubscribeListingResponseOrBuilder
extends
// @@protoc_insertion_point(interface_extends:google.cloud.bigquery.dataexchange.v1beta1.SubscribeListingResponse)
com.google.protobuf.MessageOrBuilder {}
|
googleapis/google-cloud-java | 1,049 | java-eventarc-publishing/proto-google-cloud-eventarc-publishing-v1/src/main/java/com/google/cloud/eventarc/publishing/v1/PublishChannelConnectionEventsResponseOrBuilder.java | /*
* Copyright 2025 Google LLC
*
* 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
*
* https://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.
*/
// Generated by the protocol buffer compiler. DO NOT EDIT!
// source: google/cloud/eventarc/publishing/v1/publisher.proto
// Protobuf Java Version: 3.25.8
package com.google.cloud.eventarc.publishing.v1;
public interface PublishChannelConnectionEventsResponseOrBuilder
extends
// @@protoc_insertion_point(interface_extends:google.cloud.eventarc.publishing.v1.PublishChannelConnectionEventsResponse)
com.google.protobuf.MessageOrBuilder {}
|
googleapis/google-cloud-java | 1,057 | java-discoveryengine/proto-google-cloud-discoveryengine-v1alpha/src/main/java/com/google/cloud/discoveryengine/v1alpha/EnableAdvancedSiteSearchResponseOrBuilder.java | /*
* Copyright 2025 Google LLC
*
* 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
*
* https://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.
*/
// Generated by the protocol buffer compiler. DO NOT EDIT!
// source: google/cloud/discoveryengine/v1alpha/site_search_engine_service.proto
// Protobuf Java Version: 3.25.8
package com.google.cloud.discoveryengine.v1alpha;
public interface EnableAdvancedSiteSearchResponseOrBuilder
extends
// @@protoc_insertion_point(interface_extends:google.cloud.discoveryengine.v1alpha.EnableAdvancedSiteSearchResponse)
com.google.protobuf.MessageOrBuilder {}
|
googleapis/google-cloud-java | 1,057 | java-workspaceevents/proto-google-cloud-workspaceevents-v1beta/src/main/java/com/google/apps/events/subscriptions/v1beta/ReactivateSubscriptionMetadataOrBuilder.java | /*
* Copyright 2025 Google LLC
*
* 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
*
* https://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.
*/
// Generated by the protocol buffer compiler. DO NOT EDIT!
// source: google/apps/events/subscriptions/v1beta/subscriptions_service.proto
// Protobuf Java Version: 3.25.8
package com.google.apps.events.subscriptions.v1beta;
public interface ReactivateSubscriptionMetadataOrBuilder
extends
// @@protoc_insertion_point(interface_extends:google.apps.events.subscriptions.v1beta.ReactivateSubscriptionMetadata)
com.google.protobuf.MessageOrBuilder {}
|
hibernate/hibernate-orm | 1,063 | hibernate-core/src/test/java/org/hibernate/orm/test/annotations/referencedcolumnname/Bag.java | /*
* SPDX-License-Identifier: Apache-2.0
* Copyright Red Hat Inc. and Hibernate Authors
*/
package org.hibernate.orm.test.annotations.referencedcolumnname;
import jakarta.persistence.Column;
import jakarta.persistence.Entity;
import jakarta.persistence.GeneratedValue;
import jakarta.persistence.Id;
import jakarta.persistence.JoinColumn;
import jakarta.persistence.ManyToOne;
/**
* @author Emmanuel Bernard
*/
@Entity
public class Bag {
private Integer id;
private String serial;
private Rambler owner;
public Bag() {
}
public Bag(String serial, Rambler owner) {
this.serial = serial;
this.owner = owner;
}
@Id
@GeneratedValue
public Integer getId() {
return id;
}
public void setId(Integer id) {
this.id = id;
}
@Column(unique = true)
public String getSerial() {
return serial;
}
public void setSerial(String serial) {
this.serial = serial;
}
@ManyToOne
@JoinColumn(referencedColumnName = "fld_name")
public Rambler getOwner() {
return owner;
}
public void setOwner(Rambler owner) {
this.owner = owner;
}
}
|
hibernate/hibernate-orm | 1,063 | hibernate-core/src/test/java/org/hibernate/orm/test/version/sybase/User.java | /*
* SPDX-License-Identifier: Apache-2.0
* Copyright Red Hat Inc. and Hibernate Authors
*/
package org.hibernate.orm.test.version.sybase;
import java.util.Set;
/**
* Implementation of User.
*
* @author Steve Ebersole
*/
public class User {
private Long id;
private byte[] timestamp;
private String username;
private Set groups;
private Set permissions;
public User() {
}
public User(String username) {
this.username = username;
}
public Long getId() {
return id;
}
public void setId(Long id) {
this.id = id;
}
public byte[] getTimestamp() {
return timestamp;
}
public void setTimestamp(byte[] timestamp) {
this.timestamp = timestamp;
}
public String getUsername() {
return username;
}
public void setUsername(String username) {
this.username = username;
}
public Set getGroups() {
return groups;
}
public void setGroups(Set groups) {
this.groups = groups;
}
public Set getPermissions() {
return permissions;
}
public void setPermissions(Set permissions) {
this.permissions = permissions;
}
}
|
hibernate/hibernate-orm | 1,067 | hibernate-core/src/test/java/org/hibernate/orm/test/boot/models/xml/SimpleEntity.java | /*
* SPDX-License-Identifier: Apache-2.0
* Copyright Red Hat Inc. and Hibernate Authors
*/
package org.hibernate.orm.test.boot.models.xml;
import jakarta.persistence.Basic;
import jakarta.persistence.Column;
import jakarta.persistence.Entity;
import jakarta.persistence.Id;
/**
* @author Steve Ebersole
*/
@Entity
public class SimpleEntity {
@Id
private Integer id;
@Basic
@Column(columnDefinition = "nvarchar(512)")
private String name;
protected SimpleEntity() {
// for Hibernate use
}
public SimpleEntity(Integer id, String name) {
this.id = id;
this.name = name;
}
public Integer getId() {
return id;
}
public String getName() {
return name;
}
public void setName(String name) {
this.name = name;
}
public void prePersist() {
// used by hibernate lifecycle callbacks
}
public void prePersist(Object arg1) {
// should not be used by hibernate lifecycle callbacks
}
public void preRemove() {
// used by hibernate lifecycle callbacks
}
public void preUpdate() {
// used by hibernate lifecycle callbacks
}
}
|
hibernate/hibernate-orm | 1,076 | hibernate-core/src/main/java/org/hibernate/query/sqm/SetOperator.java | /*
* SPDX-License-Identifier: Apache-2.0
* Copyright Red Hat Inc. and Hibernate Authors
*/
package org.hibernate.query.sqm;
/**
* The SQL set operators.
*
* @apiNote This is an SPI type. It should never occur
* in APIs visible to the application program.
*
* @author Christian Beikov
*/
public enum SetOperator {
/**
* Union of sets that removes duplicate rows.
*/
UNION,
/**
* Union of bags that retains all elements.
*/
UNION_ALL,
/**
* Intersection of sets that removes duplicate rows.
*/
INTERSECT,
/**
* Intersection of bags that retains duplicate matches.
*/
INTERSECT_ALL,
/**
* Exclusion of set elements of the set on the right-hand side.
*/
EXCEPT,
/**
* Exclusion of bag elements of the bag on the right-hand side that retains duplicates.
*/
EXCEPT_ALL;
public String sqlString() {
return switch (this) {
case UNION -> "union";
case UNION_ALL -> "union all";
case INTERSECT -> "intersect";
case INTERSECT_ALL -> "intersect all";
case EXCEPT -> "except";
case EXCEPT_ALL -> "except all";
};
}
}
|
hibernate/hibernate-orm | 1,118 | hibernate-core/src/main/java/org/hibernate/boot/query/NamedResultSetMappingDescriptor.java | /*
* SPDX-License-Identifier: Apache-2.0
* Copyright Red Hat Inc. and Hibernate Authors
*/
package org.hibernate.boot.query;
import org.hibernate.query.internal.ResultSetMappingResolutionContext;
import org.hibernate.query.named.NamedObjectRepository;
import org.hibernate.query.named.NamedResultSetMappingMemento;
import org.hibernate.query.spi.QueryEngine;
/**
* Models the "boot view" of a ResultSet mapping used in the mapping
* of native and procedure queries.
*
* Ultimately used to generate a NamedResultSetMappingMemento that is
* stored in the {@link NamedObjectRepository}
* for availability at runtime
*
* @author Steve Ebersole
*/
public interface NamedResultSetMappingDescriptor {
/**
* The name under which the result-set-mapping is to be registered
*/
String getRegistrationName();
/**
* Create a representation of the described ResultSet mapping for the purpose of
* being stored in Hibernate's {@link NamedObjectRepository}
*
* @see QueryEngine#getNamedObjectRepository()
*/
NamedResultSetMappingMemento resolve(ResultSetMappingResolutionContext resolutionContext);
}
|
hibernate/hibernate-orm | 1,151 | hibernate-envers/src/main/java/org/hibernate/envers/RevisionEntity.java | /*
* SPDX-License-Identifier: Apache-2.0
* Copyright Red Hat Inc. and Hibernate Authors
*/
package org.hibernate.envers;
import java.lang.annotation.ElementType;
import java.lang.annotation.Retention;
import java.lang.annotation.RetentionPolicy;
import java.lang.annotation.Target;
/**
* Marks an entity to be created whenever a new revision is generated. The revisions entity must have
* an integer-valued unique property (preferably the primary id) annotated with {@link RevisionNumber}
* and a long-valued property annotated with {@link RevisionTimestamp}. The {@link DefaultRevisionEntity}
* already has those two fields, so you may extend it, but you may also write your own revision entity
* from scratch.
*
* @author Adam Warski (adam at warski dot org)
*/
@Retention(RetentionPolicy.RUNTIME)
@Target(ElementType.TYPE)
public @interface RevisionEntity {
/**
* The optional listener that will be used to fill in the custom revision entity.
* May also be specified using the {@code org.hibernate.envers.revision_listener} configuration property.
*/
Class<? extends RevisionListener> value() default RevisionListener.class;
}
|
hibernate/hibernate-search | 1,037 | integrationtest/v5migrationhelper/orm/src/test/java/org/hibernate/search/test/embedded/update/ProductReferenceCode.java | /*
* SPDX-License-Identifier: Apache-2.0
* Copyright Red Hat Inc. and Hibernate Authors
*/
package org.hibernate.search.test.embedded.update;
import jakarta.persistence.Column;
import jakarta.persistence.Entity;
import jakarta.persistence.GeneratedValue;
import jakarta.persistence.Id;
import jakarta.persistence.ManyToOne;
@Entity
public class ProductReferenceCode {
@Id
@GeneratedValue
private Long id;
@ManyToOne(optional = false)
private ProductModel model;
@Column(nullable = false)
private String rawValue;
protected ProductReferenceCode() {
}
public ProductReferenceCode(ProductModel model, String rawValue) {
this.model = model;
this.rawValue = rawValue;
}
public Long getId() {
return id;
}
public void setId(Long id) {
this.id = id;
}
public ProductModel getModel() {
return model;
}
public void setModel(ProductModel model) {
this.model = model;
}
public String getRawValue() {
return rawValue;
}
public void setRawValue(String rawValue) {
this.rawValue = rawValue;
}
}
|
hibernate/hibernate-tools | 1,127 | gradle/plugin/src/main/java/org/hibernate/tool/gradle/Extension.java | /*
* Hibernate Tools, Tooling for your Hibernate Projects
*
* Copyright 2024-2025 Red Hat, Inc.
*
* 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.
*/
package org.hibernate.tool.gradle;
import org.gradle.api.Project;
public class Extension {
public String sqlToRun = "";
public String hibernateProperties = "hibernate.properties";
public String outputFolder = "generated-sources";
public String packageName = "";
public String revengStrategy = null;
public String revengFile = null;
public Boolean generateAnnotations = true;
public Boolean useGenerics = true;
public Extension(Project project) {}
}
|
hibernate2011/RosClient | 1,154 | app/src/main/java/com/jilk/ros/rosbridge/operation/Advertise.java | /**
* Copyright (c) 2014 Jilk Systems, Inc.
*
* This file is part of the Java ROSBridge Client.
*
* The Java ROSBridge Client is free software: you can redistribute it and/or modify
* it under the terms of the GNU General Public License as published by
* the Free Software Foundation, either version 3 of the License, or
* (at your option) any later version.
*
* The Java ROSBridge Client is distributed in the hope that it will be useful,
* but WITHOUT ANY WARRANTY; without even the implied warranty of
* MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
* GNU General Public License for more details.
*
* You should have received a copy of the GNU General Public License
* along with the Java ROSBridge Client. If not, see http://www.gnu.org/licenses/.
*
*/
package com.jilk.ros.rosbridge.operation;
import com.jilk.ros.message.MessageType;
@MessageType(string = "advertise")
public class Advertise extends Operation {
public String topic;
public String type;
public Advertise() {}
public Advertise(String topic, String type) {
this.topic = topic;
this.type = type;
}
}
|
openjdk/jdk8 | 1,171 | langtools/test/tools/javac/diags/examples/InterfaceNotAllowed.java | /*
* Copyright (c) 2010, Oracle and/or its affiliates. All rights reserved.
* DO NOT ALTER OR REMOVE COPYRIGHT NOTICES OR THIS FILE HEADER.
*
* This code is free software; you can redistribute it and/or modify it
* under the terms of the GNU General Public License version 2 only, as
* published by the Free Software Foundation.
*
* This code is distributed in the hope that it will be useful, but WITHOUT
* ANY WARRANTY; without even the implied warranty of MERCHANTABILITY or
* FITNESS FOR A PARTICULAR PURPOSE. See the GNU General Public License
* version 2 for more details (a copy is included in the LICENSE file that
* accompanied this code).
*
* You should have received a copy of the GNU General Public License version
* 2 along with this work; if not, write to the Free Software Foundation,
* Inc., 51 Franklin St, Fifth Floor, Boston, MA 02110-1301 USA.
*
* Please contact Oracle, 500 Oracle Parkway, Redwood Shores, CA 94065 USA
* or visit www.oracle.com if you need additional information or have any
* questions.
*/
// key: compiler.err.intf.not.allowed.here
class InterfaceNotAllowed {
void m() {
interface I { }
}
}
|
openjdk/jdk8 | 1,172 | langtools/test/com/sun/javadoc/testProfiles/pkg2/ClassError.java | /*
* Copyright (c) 2013, Oracle and/or its affiliates. All rights reserved.
* DO NOT ALTER OR REMOVE COPYRIGHT NOTICES OR THIS FILE HEADER.
*
* This code is free software; you can redistribute it and/or modify it
* under the terms of the GNU General Public License version 2 only, as
* published by the Free Software Foundation.
*
* This code is distributed in the hope that it will be useful, but WITHOUT
* ANY WARRANTY; without even the implied warranty of MERCHANTABILITY or
* FITNESS FOR A PARTICULAR PURPOSE. See the GNU General Public License
* version 2 for more details (a copy is included in the LICENSE file that
* accompanied this code).
*
* You should have received a copy of the GNU General Public License version
* 2 along with this work; if not, write to the Free Software Foundation,
* Inc., 51 Franklin St, Fifth Floor, Boston, MA 02110-1301 USA.
*
* Please contact Oracle, 500 Oracle Parkway, Redwood Shores, CA 94065 USA
* or visit www.oracle.com if you need additional information or have any
* questions.
*/
package pkg2;
/**
* Simple error class.
*
* @author Evgeniya Stepanova
*/
public class ClassError extends Error {}
|
openjdk/jdk8 | 1,175 | langtools/test/com/sun/javadoc/testInterface/pkg/Parent.java | /*
* Copyright (c) 2003, 2004, Oracle and/or its affiliates. All rights reserved.
* DO NOT ALTER OR REMOVE COPYRIGHT NOTICES OR THIS FILE HEADER.
*
* This code is free software; you can redistribute it and/or modify it
* under the terms of the GNU General Public License version 2 only, as
* published by the Free Software Foundation.
*
* This code is distributed in the hope that it will be useful, but WITHOUT
* ANY WARRANTY; without even the implied warranty of MERCHANTABILITY or
* FITNESS FOR A PARTICULAR PURPOSE. See the GNU General Public License
* version 2 for more details (a copy is included in the LICENSE file that
* accompanied this code).
*
* You should have received a copy of the GNU General Public License version
* 2 along with this work; if not, write to the Free Software Foundation,
* Inc., 51 Franklin St, Fifth Floor, Boston, MA 02110-1301 USA.
*
* Please contact Oracle, 500 Oracle Parkway, Redwood Shores, CA 94065 USA
* or visit www.oracle.com if you need additional information or have any
* questions.
*/
package pkg;
public class Parent<E> implements Interface<E> {
public int method() {
return 1;
}
}
|
openjdk/jdk8 | 1,175 | langtools/test/tools/javac/diags/examples/EnumAsIdentifier.java | /*
* Copyright (c) 2010, Oracle and/or its affiliates. All rights reserved.
* DO NOT ALTER OR REMOVE COPYRIGHT NOTICES OR THIS FILE HEADER.
*
* This code is free software; you can redistribute it and/or modify it
* under the terms of the GNU General Public License version 2 only, as
* published by the Free Software Foundation.
*
* This code is distributed in the hope that it will be useful, but WITHOUT
* ANY WARRANTY; without even the implied warranty of MERCHANTABILITY or
* FITNESS FOR A PARTICULAR PURPOSE. See the GNU General Public License
* version 2 for more details (a copy is included in the LICENSE file that
* accompanied this code).
*
* You should have received a copy of the GNU General Public License version
* 2 along with this work; if not, write to the Free Software Foundation,
* Inc., 51 Franklin St, Fifth Floor, Boston, MA 02110-1301 USA.
*
* Please contact Oracle, 500 Oracle Parkway, Redwood Shores, CA 94065 USA
* or visit www.oracle.com if you need additional information or have any
* questions.
*/
// key: compiler.warn.enum.as.identifier
// options: -source 1.3 -Xlint:-options
class EnumAsIdentifier {
int enum;
}
|
openjdk/jdk8 | 1,182 | langtools/test/tools/javac/diags/examples/EmptyIf.java | /*
* Copyright (c) 2010, Oracle and/or its affiliates. All rights reserved.
* DO NOT ALTER OR REMOVE COPYRIGHT NOTICES OR THIS FILE HEADER.
*
* This code is free software; you can redistribute it and/or modify it
* under the terms of the GNU General Public License version 2 only, as
* published by the Free Software Foundation.
*
* This code is distributed in the hope that it will be useful, but WITHOUT
* ANY WARRANTY; without even the implied warranty of MERCHANTABILITY or
* FITNESS FOR A PARTICULAR PURPOSE. See the GNU General Public License
* version 2 for more details (a copy is included in the LICENSE file that
* accompanied this code).
*
* You should have received a copy of the GNU General Public License version
* 2 along with this work; if not, write to the Free Software Foundation,
* Inc., 51 Franklin St, Fifth Floor, Boston, MA 02110-1301 USA.
*
* Please contact Oracle, 500 Oracle Parkway, Redwood Shores, CA 94065 USA
* or visit www.oracle.com if you need additional information or have any
* questions.
*/
// key: compiler.warn.empty.if
// options: -Xlint:empty
class EmptyIf {
void m(int a, int b) {
if (a == b) ;
}
}
|
openjdk/jdk8 | 1,185 | langtools/test/tools/javac/lambda/8012557/A.java | /*
* Copyright (c) 2013, Oracle and/or its affiliates. All rights reserved.
* DO NOT ALTER OR REMOVE COPYRIGHT NOTICES OR THIS FILE HEADER.
*
* This code is free software; you can redistribute it and/or modify it
* under the terms of the GNU General Public License version 2 only, as
* published by the Free Software Foundation.
*
* This code is distributed in the hope that it will be useful, but WITHOUT
* ANY WARRANTY; without even the implied warranty of MERCHANTABILITY or
* FITNESS FOR A PARTICULAR PURPOSE. See the GNU General Public License
* version 2 for more details (a copy is included in the LICENSE file that
* accompanied this code).
*
* You should have received a copy of the GNU General Public License version
* 2 along with this work; if not, write to the Free Software Foundation,
* Inc., 51 Franklin St, Fifth Floor, Boston, MA 02110-1301 USA.
*
* Please contact Oracle, 500 Oracle Parkway, Redwood Shores, CA 94065 USA
* or visit www.oracle.com if you need additional information or have any
* questions.
*/
interface A {
default String u() { return "A"; }
default String name() {
SAM s = ()->u()+"A";
return s.m();
}
}
|
openjdk/jdk8 | 1,185 | langtools/test/tools/javac/lambda/8012557/B.java | /*
* Copyright (c) 2013, Oracle and/or its affiliates. All rights reserved.
* DO NOT ALTER OR REMOVE COPYRIGHT NOTICES OR THIS FILE HEADER.
*
* This code is free software; you can redistribute it and/or modify it
* under the terms of the GNU General Public License version 2 only, as
* published by the Free Software Foundation.
*
* This code is distributed in the hope that it will be useful, but WITHOUT
* ANY WARRANTY; without even the implied warranty of MERCHANTABILITY or
* FITNESS FOR A PARTICULAR PURPOSE. See the GNU General Public License
* version 2 for more details (a copy is included in the LICENSE file that
* accompanied this code).
*
* You should have received a copy of the GNU General Public License version
* 2 along with this work; if not, write to the Free Software Foundation,
* Inc., 51 Franklin St, Fifth Floor, Boston, MA 02110-1301 USA.
*
* Please contact Oracle, 500 Oracle Parkway, Redwood Shores, CA 94065 USA
* or visit www.oracle.com if you need additional information or have any
* questions.
*/
interface B {
default String u() { return "B"; }
default String name() {
SAM s = ()->u()+"B";
return s.m();
}
}
|
openjdk/jdk8 | 1,185 | langtools/test/tools/javac/lambda/8012557/C.java | /*
* Copyright (c) 2013, Oracle and/or its affiliates. All rights reserved.
* DO NOT ALTER OR REMOVE COPYRIGHT NOTICES OR THIS FILE HEADER.
*
* This code is free software; you can redistribute it and/or modify it
* under the terms of the GNU General Public License version 2 only, as
* published by the Free Software Foundation.
*
* This code is distributed in the hope that it will be useful, but WITHOUT
* ANY WARRANTY; without even the implied warranty of MERCHANTABILITY or
* FITNESS FOR A PARTICULAR PURPOSE. See the GNU General Public License
* version 2 for more details (a copy is included in the LICENSE file that
* accompanied this code).
*
* You should have received a copy of the GNU General Public License version
* 2 along with this work; if not, write to the Free Software Foundation,
* Inc., 51 Franklin St, Fifth Floor, Boston, MA 02110-1301 USA.
*
* Please contact Oracle, 500 Oracle Parkway, Redwood Shores, CA 94065 USA
* or visit www.oracle.com if you need additional information or have any
* questions.
*/
interface C {
default String u() { return "C"; }
default String name() {
SAM s = ()->u()+"C";
return s.m();
}
}
|
openjdk/jtreg | 1,198 | test/reportOption/also-run/Error.java | /*
* Copyright (c) 2022, Oracle and/or its affiliates. All rights reserved.
* DO NOT ALTER OR REMOVE COPYRIGHT NOTICES OR THIS FILE HEADER.
*
* This code is free software; you can redistribute it and/or modify it
* under the terms of the GNU General Public License version 2 only, as
* published by the Free Software Foundation.
*
* This code is distributed in the hope that it will be useful, but WITHOUT
* ANY WARRANTY; without even the implied warranty of MERCHANTABILITY or
* FITNESS FOR A PARTICULAR PURPOSE. See the GNU General Public License
* version 2 for more details (a copy is included in the LICENSE file that
* accompanied this code).
*
* You should have received a copy of the GNU General Public License version
* 2 along with this work; if not, write to the Free Software Foundation,
* Inc., 51 Franklin St, Fifth Floor, Boston, MA 02110-1301 USA.
*
* Please contact Oracle, 500 Oracle Parkway, Redwood Shores, CA 94065 USA
* or visit www.oracle.com if you need additional information or have any
* questions.
*/
// tests in this directory may be run
/*
* @test
* @run syntax-error
*/
public class Error {
public static void main(String... args) { }
} |
oracle/coherence | 1,085 | prj/examples/guides/142-server-events/src/test/java/com/oracle/coherence/guides/serverevents/interceptors/LifecycleEventsInterceptor.java | /*
* Copyright (c) 2022, Oracle and/or its affiliates.
*
* Licensed under the Universal Permissive License v 1.0 as shown at
* https://oss.oracle.com/licenses/upl.
*/
package com.oracle.coherence.guides.serverevents.interceptors;
import java.io.Serializable;
import com.tangosol.net.events.EventInterceptor;
import com.tangosol.net.events.annotation.Interceptor;
import com.tangosol.net.events.annotation.LifecycleEvents;
import com.tangosol.net.events.application.LifecycleEvent;
/**
* Interceptor for lifecycle events.
*
* @author Tim Middleton 2022.05.09
*/
// #tag::class[]
@Interceptor(identifier = "LifecycleEventsInterceptor")
@LifecycleEvents({LifecycleEvent.Type.ACTIVATING, LifecycleEvent.Type.ACTIVATED, LifecycleEvent.Type.DISPOSING})
public class LifecycleEventsInterceptor
implements EventInterceptor<LifecycleEvent>, Serializable {
@Override
public void onEvent(LifecycleEvent event) {
System.out.printf("Event %s received for ccf %s\n", event.getType().toString(), event.getConfigurableCacheFactory());
}
}
// #end::class[]
|
oracle/coherence | 1,120 | prj/test/functional/persistence/src/main/java/persistence/BerkeleyDBCohQLPersistenceTests.java | /*
* Copyright (c) 2000, 2022, Oracle and/or its affiliates.
*
* Licensed under the Universal Permissive License v 1.0 as shown at
* https://oss.oracle.com/licenses/upl.
*/
package persistence;
import com.oracle.coherence.persistence.PersistenceManager;
import com.tangosol.io.ReadBuffer;
import com.tangosol.persistence.bdb.BerkeleyDBManager;
import java.io.File;
import java.io.IOException;
/**
* Functional tests for CohQL persistence commands using BDB.
*
* @author tam 2014.09.12
*/
public class BerkeleyDBCohQLPersistenceTests
extends AbstractCohQLPersistenceTests
{
// ----- AbstractCohQLPersistenceTests methods -------------------------
@Override
protected PersistenceManager<ReadBuffer> createPersistenceManager(File file)
throws IOException
{
return new BerkeleyDBManager(file, null, null);
}
@Override
public String getPersistenceManagerName()
{
return "BDB";
}
@Override
public String getCacheConfigPath()
{
return "simple-persistence-bdb-cache-config.xml";
}
} |
oracle/coherence | 1,134 | prj/coherence-core/src/main/java/com/tangosol/java/type/UnknownType.java | /*
* Copyright (c) 2000, 2020, Oracle and/or its affiliates.
*
* Licensed under the Universal Permissive License v 1.0 as shown at
* http://oss.oracle.com/licenses/upl.
*/
package com.tangosol.java.type;
/**
* The unknown type.
*
* @author cp 2001.04.30
*/
public class UnknownType
extends Type
{
// ----- constructor ----------------------------------------------------
/**
* Construct a unknown type object.
*/
UnknownType()
{
super("U");
}
// ----- accessors ------------------------------------------------------
/**
* Determine the number of stack words used to load this type.
*
* @return the number of words used on the stack to hold this type
*/
public int getWordCount()
{
throw new UnsupportedOperationException();
}
// ----- Object methods -------------------------------------------------
/**
* Format the type into its source code form.
*
* @return a source code representation of the type
*/
public String toString()
{
return "unknown";
}
} |
oracle/coherence | 1,138 | prj/coherence-core/src/main/java/com/tangosol/io/pof/generator/DebugLogger.java | /*
* Copyright (c) 2018, 2020, Oracle and/or its affiliates.
*
* Licensed under the Universal Permissive License v 1.0 as shown at
* http://oss.oracle.com/licenses/upl.
*/
package com.tangosol.io.pof.generator;
import java.util.logging.Logger;
/**
* Used by generated POF code to write log messages when
* debug code generation is enabled.
*
* @author jk 2018.04.13
*/
public class DebugLogger
{
// ----- constructors ---------------------------------------------------
/**
* Private constructor so that instances cannot be created.
*/
private DebugLogger()
{
}
// ----- DebugLogger methods --------------------------------------------
/**
* Log the specified message at {@link java.util.logging.Level#FINEST}.
*
* @param msg the log message.
*/
public static void log(String msg)
{
LOGGER.finest(msg);
}
// ----- constants ------------------------------------------------------
/**
* The {@link Logger} to use.
*/
private static Logger LOGGER = Logger.getLogger(DebugLogger.class.getName());
}
|
oracle/nosql | 1,136 | kvtest/kvstore-IT/src/main/java/oracle/kv/impl/security/login/LoginTestBase.java | /*-
* See the file LICENSE for redistribution information.
*
* Copyright (c) 2011, 2025 Oracle and/or its affiliates. All rights reserved.
*
*/
package oracle.kv.impl.security.login;
import static oracle.kv.impl.util.TestUtils.safeUnexport;
import java.rmi.Remote;
import java.rmi.RemoteException;
import java.rmi.server.UnicastRemoteObject;
import oracle.kv.TestBase;
import oracle.kv.impl.async.EndpointGroup.ListenHandle;
public class LoginTestBase extends TestBase {
@Override
public void setUp()
throws Exception {
super.setUp();
}
@Override
public void tearDown()
throws Exception {
super.tearDown();
}
protected <T extends Remote> T export(T object)
throws RemoteException {
tearDowns.add(() -> safeUnexport(object));
@SuppressWarnings("unchecked")
final T result = (T) UnicastRemoteObject.exportObject(object, 0);
return result;
}
void tearDownListenHandle(ListenHandle listenHandle) {
if (listenHandle != null) {
tearDowns.add(() -> listenHandle.shutdown(true));
}
}
}
|
oracle/nosql | 1,154 | kvmain/src/main/java/oracle/kv/impl/measurement/StackTrace.java | /*-
* Copyright (C) 2011, 2025 Oracle and/or its affiliates. All rights reserved.
*
* This file was distributed by Oracle as part of a version of Oracle NoSQL
* Database made available at:
*
* http://www.oracle.com/technetwork/database/database-technologies/nosqldb/downloads/index.html
*
* Please see the LICENSE file included in the top-level directory of the
* appropriate version of Oracle NoSQL Database for a copy of the license and
* additional information.
*/
package oracle.kv.impl.measurement;
import java.io.Serializable;
/**
*/
public class StackTrace implements Measurement, Serializable {
private static final long serialVersionUID = 1L;
private final int measurementId;
private final String stackTrace;
public StackTrace(int id, String trace) {
measurementId = id;
stackTrace = trace;
}
@Override
public int getId() {
return measurementId;
}
@Override
public String toString() {
return stackTrace;
}
@Override
public long getStart() {
return 0;
}
@Override
public long getEnd() {
return 0;
}
} |
apache/crunch | 1,167 | crunch-spark/src/main/java/org/apache/crunch/fn/SparkMapFn.java | /**
* Licensed to the Apache Software Foundation (ASF) under one
* or more contributor license agreements. See the NOTICE file
* distributed with this work for additional information
* regarding copyright ownership. The ASF licenses this file
* to you 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.
*/
package org.apache.crunch.fn;
import org.apache.crunch.Emitter;
import org.apache.crunch.MapFn;
abstract class SparkMapFn<T, R> extends MapFn<T, R> {
@Override
public final void initialize() {
// Forced no-op for Spark compatibility
}
@Override
public final void cleanup(Emitter<R> emitter) {
// Forced no-op for Spark compatibility
}
}
|
apache/ctakes | 1,131 | ctakes-examples/src/main/java/org/apache/ctakes/examples/cc/ApacheConSectionWriter.java | package org.apache.ctakes.examples.cc;
import org.apache.ctakes.core.cc.AbstractJCasFileWriter;
import org.apache.ctakes.typesystem.type.textspan.Segment;
import org.apache.uima.fit.util.JCasUtil;
import org.apache.uima.jcas.JCas;
import java.io.*;
import java.util.Collection;
/**
*
*/
public class ApacheConSectionWriter extends AbstractJCasFileWriter {
/**
* Writes some document metadata and discovered event information.
*/
@Override
public void writeFile( JCas jCas,
String outputDir,
String documentId,
String fileName ) throws IOException {
File file = new File( outputDir, fileName + "_Sections.txt" );
try ( Writer writer = new BufferedWriter( new FileWriter( file ) ) ) {
Collection<Segment> sections = JCasUtil.select( jCas, Segment.class );
for ( Segment section : sections ) {
writer.write( "Section ID : " + section.getId() + "\t" + "Document Text : " + section.getTagText() + "\n" );
writer.write( section.getCoveredText() + "\n" );
}
}
}
}
|
apache/curator | 1,137 | curator-framework/src/main/java/org/apache/curator/framework/WatcherRemoveCuratorFramework.java | /*
* Licensed to the Apache Software Foundation (ASF) under one
* or more contributor license agreements. See the NOTICE file
* distributed with this work for additional information
* regarding copyright ownership. The ASF licenses this file
* to you 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.
*/
package org.apache.curator.framework;
/**
* A CuratorFramework facade that tracks watchers created and allows a one-shot removal of all watchers
*/
public interface WatcherRemoveCuratorFramework extends CuratorFramework {
/**
* Remove all outstanding watchers that have been set
*/
void removeWatchers();
}
|
apache/curator | 1,143 | curator-x-discovery/src/main/java/org/apache/curator/x/discovery/details/Latch.java | /*
* Licensed to the Apache Software Foundation (ASF) under one
* or more contributor license agreements. See the NOTICE file
* distributed with this work for additional information
* regarding copyright ownership. The ASF licenses this file
* to you 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.
*/
package org.apache.curator.x.discovery.details;
class Latch {
private volatile boolean laden = false;
synchronized void set() {
laden = true;
notifyAll();
}
synchronized void await() throws InterruptedException {
while (!laden) {
wait();
}
laden = false;
}
}
|
apache/cxf | 1,141 | tools/javato/ws/src/test/java/org/apache/cxf/tools/fortest/classnoanno/docwrapped/Stock.java | /**
* Licensed to the Apache Software Foundation (ASF) under one
* or more contributor license agreements. See the NOTICE file
* distributed with this work for additional information
* regarding copyright ownership. The ASF licenses this file
* to you 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.
*/
package org.apache.cxf.tools.fortest.classnoanno.docwrapped;
import jakarta.jws.WebMethod;
import jakarta.jws.WebService;
import jakarta.xml.ws.RequestWrapper;
import jakarta.xml.ws.ResponseWrapper;
@WebService
public interface Stock {
@WebMethod
@RequestWrapper
@ResponseWrapper
float getPrice(String tickerSymbol);
}
|
apache/cxf | 1,164 | rt/frontend/jaxrs/src/main/java/org/apache/cxf/jaxrs/ext/TRACE.java | /**
* Licensed to the Apache Software Foundation (ASF) under one
* or more contributor license agreements. See the NOTICE file
* distributed with this work for additional information
* regarding copyright ownership. The ASF licenses this file
* to you 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.
*/
package org.apache.cxf.jaxrs.ext;
import java.lang.annotation.ElementType;
import java.lang.annotation.Retention;
import java.lang.annotation.RetentionPolicy;
import java.lang.annotation.Target;
import jakarta.ws.rs.HttpMethod;
@HttpMethod("TRACE")
@Target(value = ElementType.METHOD)
@Retention(value = RetentionPolicy.RUNTIME)
public @interface TRACE {
}
|
apache/deltaspike | 1,100 | deltaspike/modules/jsf/impl/src/test/java/org/apache/deltaspike/test/jsf/impl/config/view/navigation/destination/uc001/Pages.java | /*
* Licensed to the Apache Software Foundation (ASF) under one
* or more contributor license agreements. See the NOTICE file
* distributed with this work for additional information
* regarding copyright ownership. The ASF licenses this file
* to you 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.
*/
package org.apache.deltaspike.test.jsf.impl.config.view.navigation.destination.uc001;
import org.apache.deltaspike.core.api.config.view.ViewConfig;
//nesting only leads to the final path - in this case /pages/index.xhtml
interface Pages
{
class Index implements ViewConfig
{
}
}
|
apache/directory-kerby | 1,134 | kerby-kerb/kerb-core/src/main/java/org/apache/kerby/kerberos/kerb/type/base/LastReq.java | /**
* Licensed to the Apache Software Foundation (ASF) under one
* or more contributor license agreements. See the NOTICE file
* distributed with this work for additional information
* regarding copyright ownership. The ASF licenses this file
* to you 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.
*
*/
package org.apache.kerby.kerberos.kerb.type.base;
import org.apache.kerby.kerberos.kerb.type.KrbSequenceOfType;
/**
LastReq ::= SEQUENCE OF SEQUENCE {
lr-type [0] Int32,
lr-value [1] KerberosTime
}
*/
public class LastReq extends KrbSequenceOfType<LastReqEntry> {
}
|
apache/directory-studio | 1,113 | plugins/connection.core/src/main/java/org/apache/directory/studio/connection/core/event/EventRunnable.java | /*
* Licensed to the Apache Software Foundation (ASF) under one
* or more contributor license agreements. See the NOTICE file
* distributed with this work for additional information
* regarding copyright ownership. The ASF licenses this file
* to you 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.
*
*/
package org.apache.directory.studio.connection.core.event;
/**
* An <code>EventRunnable</code> is used to notify a listener
* about an event.
*
* @author <a href="mailto:dev@directory.apache.org">Apache Directory Project</a>
*/
public interface EventRunnable extends Runnable
{
}
|
apache/druid | 1,146 | processing/src/main/java/org/apache/druid/segment/data/ColumnarFloatsSerializer.java | /*
* Licensed to the Apache Software Foundation (ASF) under one
* or more contributor license agreements. See the NOTICE file
* distributed with this work for additional information
* regarding copyright ownership. The ASF licenses this file
* to you 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.
*/
package org.apache.druid.segment.data;
import org.apache.druid.segment.serde.Serializer;
import java.io.IOException;
/**
* Serializer that produces {@link ColumnarFloats}.
*/
public interface ColumnarFloatsSerializer extends Serializer
{
void open() throws IOException;
int size();
void add(float value) throws IOException;
}
|
apache/dubbo-samples | 1,117 | online_bontique_demo/common/src/main/java/org/apache/dubbo/shop/common/dto/response/PlaceOrderResponse.java | /*
* Licensed to the Apache Software Foundation (ASF) under one or more
* contributor license agreements. See the NOTICE file distributed with
* this work for additional information regarding copyright ownership.
* The ASF licenses this file to You 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.
*/
package org.apache.dubbo.shop.common.dto.response;
import org.apache.dubbo.shop.common.pojo.OrderResult;
import lombok.AllArgsConstructor;
import lombok.Data;
import java.io.Serializable;
@Data
@AllArgsConstructor
public class PlaceOrderResponse implements Serializable {
private OrderResult order;
}
|
apache/dubbo-samples | 1,123 | online_bontique_demo/common/src/main/java/org/apache/dubbo/shop/common/pojo/Ad.java | /*
* Licensed to the Apache Software Foundation (ASF) under one or more
* contributor license agreements. See the NOTICE file distributed with
* this work for additional information regarding copyright ownership.
* The ASF licenses this file to You 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.
*/
package org.apache.dubbo.shop.common.pojo;
import lombok.AllArgsConstructor;
import lombok.Data;
import java.io.Serializable;
@Data
@AllArgsConstructor
public class Ad implements Serializable {
/**
* 跳转链接
*/
private String redirectUrl;
/**
* 文本
*/
private String text;
}
|
apache/dubbo-spi-extensions | 1,129 | dubbo-common-extensions/src/test/java/org/apache/dubbo/common/utils/TestBClass.java | /*
* Licensed to the Apache Software Foundation (ASF) under one or more
* contributor license agreements. See the NOTICE file distributed with
* this work for additional information regarding copyright ownership.
* The ASF licenses this file to You 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.
*/
package org.apache.dubbo.common.utils;
public class TestBClass {
private String name;
public TestBClass() {
}
public TestBClass(String name) {
this.name = name;
}
public String getName() {
return name;
}
public void setName(String name) {
this.name = name;
}
}
|
apache/dubbo | 1,134 | dubbo-remoting/dubbo-remoting-api/src/test/java/org/apache/dubbo/remoting/codec/CodecAdapterTest.java | /*
* Licensed to the Apache Software Foundation (ASF) under one or more
* contributor license agreements. See the NOTICE file distributed with
* this work for additional information regarding copyright ownership.
* The ASF licenses this file to You 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.
*/
package org.apache.dubbo.remoting.codec;
import org.apache.dubbo.remoting.transport.codec.CodecAdapter;
import org.junit.jupiter.api.BeforeEach;
class CodecAdapterTest extends ExchangeCodecTest {
@BeforeEach
public void setUp() throws Exception {
codec = new CodecAdapter(new DeprecatedExchangeCodec());
}
}
|
apache/dubbo | 1,141 | dubbo-common/src/test/java/org/apache/dubbo/common/extension/convert/String2DoubleConverter.java | /*
* Licensed to the Apache Software Foundation (ASF) under one or more
* contributor license agreements. See the NOTICE file distributed with
* this work for additional information regarding copyright ownership.
* The ASF licenses this file to You 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.
*/
package org.apache.dubbo.common.extension.convert;
import org.apache.dubbo.common.convert.Converter;
import org.apache.dubbo.common.convert.StringToDoubleConverter;
/**
* A {@link Converter} implementation of {@link String} to {@link Double}
*
* @since 2.7.7
*/
public class String2DoubleConverter extends StringToDoubleConverter {}
|
apache/dubbo | 1,143 | dubbo-plugin/dubbo-filter-validation/src/main/java/org/apache/dubbo/validation/Validator.java | /*
* Licensed to the Apache Software Foundation (ASF) under one or more
* contributor license agreements. See the NOTICE file distributed with
* this work for additional information regarding copyright ownership.
* The ASF licenses this file to You 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.
*/
package org.apache.dubbo.validation;
/**
* Instance of validator class is an extension to perform validation on method input parameter before the actual method invocation.
*
*/
public interface Validator {
void validate(String methodName, Class<?>[] parameterTypes, Object[] arguments) throws Exception;
boolean isSupport();
}
|
apache/dubbo | 1,154 | dubbo-common/src/main/java/org/apache/dubbo/common/concurrent/AbortPolicy.java | /*
* Licensed to the Apache Software Foundation (ASF) under one or more
* contributor license agreements. See the NOTICE file distributed with
* this work for additional information regarding copyright ownership.
* The ASF licenses this file to You 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.
*/
package org.apache.dubbo.common.concurrent;
import java.util.Queue;
/**
* A handler for rejected element that throws a {@code RejectException}.
*/
public class AbortPolicy<E> implements Rejector<E> {
@Override
public void reject(final E e, final Queue<E> queue) {
throw new RejectException("no more memory can be used !");
}
}
|
apache/eagle | 1,110 | eagle-core/eagle-alert-parent/eagle-alert/alert-engine/src/main/java/org/apache/eagle/alert/engine/serialization/Serializer.java | /**
* Licensed to the Apache Software Foundation (ASF) under one or more
* contributor license agreements. See the NOTICE file distributed with
* this work for additional information regarding copyright ownership.
* The ASF licenses this file to You 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
* <p/>
* http://www.apache.org/licenses/LICENSE-2.0
* <p/>
* 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.
*/
package org.apache.eagle.alert.engine.serialization;
import java.io.DataInput;
import java.io.DataOutput;
import java.io.IOException;
public interface Serializer<V> {
void serialize(V value, DataOutput dataOutput) throws IOException;
V deserialize(DataInput dataInput) throws IOException;
} |
apache/eventmesh | 1,104 | eventmesh-connectors/eventmesh-connector-wecom/src/test/java/org/apache/eventmesh/connector/wecom/connector/MockRecordOffset.java | /*
* Licensed to the Apache Software Foundation (ASF) under one or more
* contributor license agreements. See the NOTICE file distributed with
* this work for additional information regarding copyright ownership.
* The ASF licenses this file to You 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.
*/
package org.apache.eventmesh.connector.wecom.connector;
import org.apache.eventmesh.common.remote.offset.RecordOffset;
public class MockRecordOffset extends RecordOffset {
@Override
public Class<? extends RecordOffset> getRecordOffsetClass() {
return MockRecordOffset.class;
}
}
|
apache/felix-dev | 1,064 | ipojo/manipulator/manipulator-it/ipojo-manipulator-creation-test/src/main/java/org/apache/felix/ipojo/runtime/core/components/CallSuperSuperConstructorWithNew.java | /*
* Licensed to the Apache Software Foundation (ASF) under one
* or more contributor license agreements. See the NOTICE file
* distributed with this work for additional information
* regarding copyright ownership. The ASF licenses this file
* to you 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.
*/
package org.apache.felix.ipojo.runtime.core.components;
public class CallSuperSuperConstructorWithNew extends ParentClass2 {
public CallSuperSuperConstructorWithNew() {
super(new String("test"));
System.out.println("plop");
}
}
|
Subsets and Splits
No community queries yet
The top public SQL queries from the community will appear here once available.